제출 #512814

#제출 시각아이디문제언어결과실행 시간메모리
512814algorithm16Languages (IOI10_languages)C++14
0 / 100
10091 ms34628 KiB
#include<iostream> #include<vector> #include<unordered_set> #include<algorithm> #include "grader.h" #include "lang.h" using namespace std; typedef long long int llint; unordered_set <llint> s[65],s1; llint e[105],cnt1[70005]; vector <llint> v; void excerpt(int *E) { //s1.clear(); for(int i=0;i<100;i++) { e[i]=E[i]; cnt1[e[i]]+=1; //s1.insert(e[i]); v.push_back(e[i]); if(i>=50) { //s1.insert(e[i-1]*1e5+e[i]); v.push_back(e[i-1]*1e5+e[i]); } //if(i && i%4) s1.insert(e[i-1]*1e5+e[i]); //if(i>1 && i%4==0) s1.insert(e[i-2]*1e10+e[i-1]*1e5+e[i]); } for(int i=1;i<100;i+=e[i]%2+1) { //s1.insert(e[i-1]*1e5+e[i]); v.push_back(e[i-1]*1e5+e[i]); } for(int i=2;i<100;i+=e[i]%2+1) { //s1.insert(e[i-2]*1e10+e[i-1]*1e5+e[i]); v.push_back(e[i-2]*1e10+e[i-1]*1e5+e[i]); } llint mx=0,idx=0; for(int i=0;i<56;i++) { llint cnt=0; for(int j=0;j<v.size();j++) { if(v[j]<65536) cnt+=(s[i].find(v[j])!=s[i].end())*cnt1[v[j]]*20; else cnt+=(s[i].find(v[j])!=s[i].end())*100; } if(cnt>mx) { mx=cnt; idx=i; } } int l=language(idx); for(int i=0;i<v.size();i++) { s[l].insert(v[i]); } for(int i=0;i<100;i++) { cnt1[e[i]]-=1; } }

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

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:37:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   37 |   for(int j=0;j<v.size();j++) {
      |               ~^~~~~~~~~
lang.cpp:47:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   47 |  for(int i=0;i<v.size();i++) {
      |              ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...