제출 #993930

#제출 시각아이디문제언어결과실행 시간메모리
993930Lib마술쇼 (APIO24_show)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "Alice.h" using namespace std; int toggled[500]; int perm1[10000]; int perm2[10000]; int perm3[10000]; long long x; long long len=4801; set <int> rem; vector <pair<int,int> > TVector; vector <vector<int> > inGroup; vector <int> nums; vector<pair <int,int>> Alice(){ setN(x); x^=463222221001217544; int toggledcnt=0; inGroup.clear(); TVector.clear(); for(int i=1;i<=200;i++){ inGroup.push_back(nums); } for(int i=0;i<=60;i++){ if(x >> i & 1){ toggled[i]=1; toggledcnt++; } } for(int i=1;i<=4801;i++){ perm1[i]=-1; rem.insert(i); inGroup[(i-1)/34].push_back(i); } //initialize the 1st perm; for(int i=0;i<=60;i++){ if(toggled[i]){ for(int k=1;k<=17;k++){ perm1[i*17+k]=i; } for(int k=1;k<=34;k++){ rem.erase(i*34+k); } } } srand(123190); for(int i=1;i<=len-1-toggledcnt*17;i++){ swap(perm1[i],perm1[rand()%(len-i-toggledcnt*17)+i]); } int cur=1,cur2=1,cur3=1; for(int i=1;i<=4801;i++){ if(rem.count(i)){ perm3[cur]=i; cur++; } } int ta,tb; for(int i=0;i<=60;i++){ for(int k=1;k<=500;k++){ ta=rand()%34; tb=rand()%34; swap(inGroup[i][ta],inGroup[i][tb]); } } cur--; for(int i=1;i<cur;i++){ swap(perm3[i],perm3[rand()%(cur-i)+i+1]); } cur=1; for(int i=1;i<=len-toglgedcnt*17;i++){ if(perm1[i]>-1){ perm2[cur]= } } }

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

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:69:21: error: 'toglgedcnt' was not declared in this scope; did you mean 'toggledcnt'?
   69 |  for(int i=1;i<=len-toglgedcnt*17;i++){
      |                     ^~~~~~~~~~
      |                     toggledcnt
Alice.cpp:72:3: error: expected primary-expression before '}' token
   72 |   }
      |   ^
Alice.cpp:49:12: warning: unused variable 'cur2' [-Wunused-variable]
   49 |  int cur=1,cur2=1,cur3=1;
      |            ^~~~
Alice.cpp:49:19: warning: unused variable 'cur3' [-Wunused-variable]
   49 |  int cur=1,cur2=1,cur3=1;
      |                   ^~~~
Alice.cpp:74:1: warning: no return statement in function returning non-void [-Wreturn-type]
   74 | }
      | ^

/usr/bin/ld: /tmp/ccjK3XsM.o: in function `main':
grader_bob.cpp:(.text.startup+0x324): undefined reference to `Bob(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >)'
collect2: error: ld returned 1 exit status