Submission #668828

#TimeUsernameProblemLanguageResultExecution timeMemory
668828AstraytScales (IOI15_scales)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "scales.h" using namespace std; #define pb push_back #define ll long long #define pii pair<int,int> #define All(x) x.begin(), x.end()   vector<int> adj[6]; int t, deg[6], arr[6];   void init(int T){ t = T; for(int i = 0; i < 6; ++i) deg[i] = 0; }   void orderCoins(){ for(int i = 0; i < 6; ++i){ adj[i].clear(); } for(int i = 1; i <= 6; ++i){ for(int j = i + 1; j <= 6; ++j){ for(int k = j + 1; k <= 6; ++k){ int a = getHeaviest(i, j, k), b = getMedium(i, j, k), c; if(a == i && b == j || a == j && b == i) c = k; else if(a == i && b == k || a == k && b == i) c = j; else c = i; adj[a].pb(b), adj[b].pb(c); deg[b]++, deg[c]++; } } } queue<int> bfs; vector<int> top; for(int i = 0; i < 6; ++i){ if(deg[i] == 0) bfs.push(i); } while(bfs.size()){ int u = bfs.front(); bfs.pop(); top.pb(u); for(auto v:adj[u]){ deg[v]--; if(deg[v] == 0) bfs.push(v); } } reverse(top.begin(), top.end()); int ans[6]; for(int i = 0; i < 6; ++i) ans[i] = top[i] + 1; answer(ans); return; }

Compilation message (stderr)

scales.cpp:8:4: error: extended character   is not valid in an identifier
    8 |     
      |    ^
scales.cpp:11:1: error: extended character   is not valid in an identifier
   11 |  
      | ^
scales.cpp:16:5: error: extended character   is not valid in an identifier
   16 |      
      |     ^
scales.cpp:8:4: error: '\U000000a0' does not name a type
    8 |     
      |    ^
scales.cpp:11:1: error: '\U000000a0' does not name a type
   11 |  
      | ^
scales.cpp:16:5: error: '\U000000a0' does not name a type
   16 |      
      |     ^