제출 #512697

#제출 시각아이디문제언어결과실행 시간메모리
512697algorithm16Languages (IOI10_languages)C++14
컴파일 에러
0 ms0 KiB
#include<iostream> #include<set> #include<algorithm> #include "grader.h" #include "lang.h" using namespace std; typedef long long int llint; set <llint> s[65],s1; int cnt[70005]; int cmp(int i) { int ret=0; for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) { cnt[(*it)]+=1; } for(set <llint>::iterator it=s[i].begin();it!=s[i].end();it++) { if(cnt[(*it)]) ret+=1; } for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) { cnt[(*it)]-=1; } return ret; } void excerpt(llint *E) { s1.clear(); for(int i=0;i<100;i++) { s1.insert(E[i]); if(i) s1.insert(E[i-1]*1e5+E[i]); if(i>1) s1.insert(E[i-2]*1e10+E[i-1]*1e5+E[i]); } int mx=0,idx=0; for(int i=0;i<56;i++) { if(s[i].size()<=mx) continue; int cnt1=cmp(i); if(cnt1>mx) { mx=cnt1; idx=i; } } int l=language(idx); for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) { s[l].insert(*it); } }

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

lang.cpp: In function 'void excerpt(llint*)':
lang.cpp:32:17: warning: comparison of integer expressions of different signedness: 'std::set<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   32 |   if(s[i].size()<=mx) continue;
      |      ~~~~~~~~~~~^~~~
/usr/bin/ld: /tmp/cc20h27V.o: in function `main':
grader.c:(.text.startup+0x12f): undefined reference to `excerpt(int*)'
collect2: error: ld returned 1 exit status