# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
619725 | 2022-08-02T15:15:02 Z | APROHACK | Monster Game (JOI21_monster) | C++17 | 159 ms | 4184 KB |
#include "monster.h" #include <bits/stdc++.h> #define ll long long #define ff first #define ss second #define pb push_back using namespace std; namespace { bool example_variable; } // namespace vector<int>value; std::vector<int> Solve(int N) { std::vector<int> T(N); int n = N; vector<int>ceroouno, nn; int wins[N][N]; value.resize(N); memset(wins, -1, sizeof wins); for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < n ; j++){ if(i==j)continue; bool ans; if(wins[i][j]!=-1){ ans = wins[i][j]; }else{ ans = Query(i, j); wins[i][j]=ans, wins[j][i]=!ans; } if(ans)value[i]++; } if(value[i]==1){ ceroouno.pb(i); cout << i << " a \n"; }else if(value[i] == n-2){ nn.pb(i); cout << i << " b \n"; } } if(wins[ceroouno[0]][ceroouno[1]]){ value[ceroouno[0]]=0; }else value[ceroouno[1]]=0; if(wins[nn[0]][nn[1]]){ value[nn[1]]=n-1; }else value[nn[0]]=n-1; return value; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 208 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 208 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 159 ms | 4184 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |