제출 #1099129

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10991292024-10-10 15:31:34alexander_707070저울 (IOI15_scales)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
//#include "teams.h"
#define MAXN 1000007
using namespace std;
int n,m;
pair<int,int> p[MAXN];
int k[MAXN];
struct interval{
int l,r,k,e;
int len(){
return r-l+1;
}
};
interval combine(interval a,interval b){
interval c={a.l,b.r,0,0};
if(a.k>a.len())swap(a,b);
if(a.k>a.len() and b.k>b.len()){
c.k=c.len()+1;
c.e=0;
}else if(b.k>b.len()){
c.k=a.k+b.len();
c.e=a.e;
}else{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

scales.cpp: In member function 'int PST::getkth(int, int, int, int, int)':
scales.cpp:78:46: warning: declaration of 'k' shadows a global declaration [-Wshadow]
   78 |     int getkth(int v1,int v2,int l,int r,int k){
      |                                          ~~~~^
scales.cpp:9:5: note: shadowed declaration is here
    9 | int k[MAXN];
      |     ^
scales.cpp: In member function 'int PST::kth(int, int, int)':
scales.cpp:91:29: warning: declaration of 'k' shadows a global declaration [-Wshadow]
   91 |     int kth(int l,int r,int k){
      |                         ~~~~^
scales.cpp:9:5: note: shadowed declaration is here
    9 | int k[MAXN];
      |     ^
/usr/bin/ld: /tmp/cctArIzc.o: in function `main':
scales.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccz5juEd.o:grader.c:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccz5juEd.o: in function `main':
grader.c:(.text.startup+0x7e): undefined reference to `init'
/usr/bin/ld: grader.c:(.text.startup+0xfb): undefined reference to `orderCoins'
collect2: error: ld returned 1 exit status