# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
846903 | 2023-09-08T15:52:09 Z | Abito | Monster Game (JOI21_monster) | C++17 | 2 ms | 600 KB |
#include "monster.h" #include <bits/stdc++.h> #define elif else if #define pb push_back using namespace std; const int N=205; int n,s[N],in[N],out[N]; bool b[N][N],adj[N][N]; namespace { bool example_variable; } // namespace std::vector<int> Solve(int N) { n=N; for (int i=0;i<n;i++){ for (int j=i+1;j<n;j++){ b[i][j]=Query(i,j); b[j][i]=!b[i][j]; } } for (int i=0;i<n;i++){ for (int j=0;j<n;j++){ if (!b[i][j]) continue; for (int k=0;k<n;k++){ if (!b[i][k] || !b[k][j]) continue; adj[i][j]=true; in[j]++; out[i]++; //cout<<i<<' '<<k<<' '<<j<<endl; break; } } } for (int i=0;i<n;i++) s[i]=out[i]+1; for (int i=0;i<n;i++){ for (int j=i+1;j<n;j++){ if (out[i]!=out[j]) continue; if (in[i]<in[j]) s[j]--; else s[i]--; } }vector<int> ans; for (int i=0;i<n;i++) ans.pb(s[i]); return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Wrong Answer [3] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 600 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |