QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#648041#8934. Challenge NPCargtarg#WA 16ms8660kbC++201.1kb2024-10-17 16:46:022024-10-17 16:46:03

Judging History

你现在查看的是最新测评结果

  • [2024-10-17 16:46:03]
  • 评测
  • 测评结果:WA
  • 用时:16ms
  • 内存:8660kb
  • [2024-10-17 16:46:02]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define pii pair<int, int>
void solve();

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int T = 1;
//    cin >> T;
    while (T--)solve();
    return 0;
}
void solve(){
    int _;
    cin>>_;
    const int n=1020;
    vector<int>a,b,c;
    int cnt=0;
    vector<int>ans(n+2);
    a.push_back(1);
    b.push_back(2);
    c.push_back(3);
    vector<pii>m;
    auto pb=[&](int x,int y)->void{
        m.push_back({x,y});
    };
    pb(1,2);
    ans[1]=1,ans[2]=2,ans[3]=3;
    cnt=3;
    while(cnt<n){
        cnt++;
        ans[cnt]=3;
        for(int it:a){
            pb(it,cnt);
        }
        pb(2,cnt);
        cnt++;
        ans[cnt]=1;
        for(int it:c){
            pb(it,cnt);
        }
        pb(2,cnt);
        c.push_back(cnt-1);
        a.push_back(cnt);
    }
    cout<<cnt<<" "<<m.size()<<' '<<3<<endl;
    for(int i=1;i<=n;i++)cout<<ans[i]<<' ';
    cout<<endl;
    for(auto [i,j]:m){
        cout<<i<<' '<<j<<endl;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 16ms
memory: 8660kb

input:

1

output:

1021 260609 3
1 2 3 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 ...

result:

wrong answer The graph is not correct