| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 853391 | vjudge1 | Art Collections (BOI22_art) | C++17 | 1202 ms | 2032 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
SAMPLE GRADER for task ART
USAGE:
place together with your solution and art.h in the same directory, then open the terminal in this directory
(right-click onto an empty spot in the directory, left click on "Open in terminal") and enter:
g++ <flags> sample_grader.cpp <solution_file>
e.g.:
g++ -std=c++17 sample_grader.cpp art.cpp
This will create a file a.out in the current directory which you can execute from the terminal as ./a.out
INPUT/OUTPUT:
The sample grader first expects on standard input two lines. The first line should
contain the integer N. The second line should contain a list of N space-separated
integers, the correct ranking of the collections in the same format as for publish
and answer. Then, the grader calls solve(N) and writes to standard output a protocol
of all grader functions called by your program. Upon termination, it writes your
verdict to standard output.
*/
#include<bits/stdc++.h>
#include "art.h"
using namespace std;
void solve(int N){
map<int,int> idx;
for(int i = 1; i<=N; i++){
vector<int> v = {i};
for(int j = 1; j<=N; j++){
if(i == j) continue;
v.push_back(j);
}
vector<int> v1;
for(int j = 1; j<=N; j++){
if(i == j) continue;
v1.push_back(j);
}
v1.push_back(i);
int z = publish(v);
int z1 = publish(v1);
int idxs = z + z1 - (N-1);
idxs/=2;
idxs = z-idxs;
idx[i] = idxs;
}
vector<int> ans(N);
for(auto x : idx) ans[x.second] = x.first;
answer(ans);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
