| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 544575 | Rafi22 | Super Dango Maker (JOI22_dango3) | C++17 | 2533 ms | 724 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "dango3.h"
using namespace std;
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define ll long long
namespace {
ll mod=1000000007;
int inf=1000000007;
ll infl=1000000000000000007;
bool taken[407*27];
bool was[27];
} // namespace
void Solve(int n,int m)
{
srand(time(NULL));
vector<int>ord(n*m);
for(int i=0;i<n*m;i++) ord[i]=i+1;
random_shuffle(all(ord));
vector<int>ans[m];
for(auto x:ord)
{
memset(was,0,sizeof was);
while(true)
{
int i=rand()%m;
if(was[i]||sz(ans[i])==n) continue;
was[i]=1;
taken[x]=1;
for(auto y:ans[i]) taken[y]=1;
vector<int> Z;
for(int j=1;j<=n*m;j++) if(!taken[j]) Z.pb(j);
if(Query(Z)==m-1)
{
ans[i].pb(x);
for(auto y:ans[i]) taken[y]=0;
break;
}
for(auto y:ans[i]) taken[y]=0;
taken[x]=0;
}
}
for(int i=0;i<m;i++)
{
Answer(ans[i]);
}
}
컴파일 시 표준 에러 (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... | ||||
