Submission #120192

#TimeUsernameProblemLanguageResultExecution timeMemory
120192pavelScales (IOI15_scales)C++14
Compilation error
0 ms0 KiB
#include <vector> #include <algorithm> #include <cstdio> #include "scales.h" using namespace std; void init(int T) { /* ... */ } vector<int> graph[10]; void orderCoins() { int W[6], wi=0; int a = getLightest(1, 2, 3); for(int i=1;i<=3;++i) if(a!=i) graph[a].push_back(i); int b = getLightest(4, 5, 6); for(int i=4;i<=6;++i) if(b!=i) graph[b].push_back(i); if(getLightest(a, graph[a][0], b)==b) swap(a,b); W[wi++]=a; int x=getLightest(b, graph[a][0], graph[a][1]); W[wi++]=x; if(x==b){ graph[a].insert(graph[a].end(), graph[b].begin(), graph[b].end()); }else{ graph[a].erase(find(graph[a].begin(), graph[a].end(), x)); x = getLightest(graph[a][0], b, graph[b][0]); W[wi++]=x; if(x!=b){ graph[a].erase W[wi++]=b; } graph[a].insert } }

Compilation message (stderr)

In file included from grader.c:2:0:
graderlib.c: In function 'void answer(int*)':
graderlib.c:53:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (_ghksjhdfkae19ga_ > 1) 
     ^~
graderlib.c:56:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  for (i = 0; i < 6; i++) {
  ^~~
scales.cpp: In function 'void init(int)':
scales.cpp:8:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
scales.cpp: In function 'void orderCoins()':
scales.cpp:33:13: error: expected ';' before 'W'
             W[wi++]=b;
             ^
scales.cpp:32:22: error: statement cannot resolve address of overloaded function
             graph[a].erase
             ~~~~~~~~~^~~~~
scales.cpp:36:5: error: expected ';' before '}' token
     }
     ^
scales.cpp:35:18: error: statement cannot resolve address of overloaded function
         graph[a].insert
         ~~~~~~~~~^~~~~~