QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#580117#8934. Challenge NPCForever_Young#WA 0ms3792kbC++23766b2024-09-21 20:09:252024-09-21 20:09:25

Judging History

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

  • [2024-09-21 20:09:25]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3792kb
  • [2024-09-21 20:09:25]
  • 提交

answer


#include <bits/stdc++.h>
#define rep(i,n) for(int i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define stack stck
using namespace std;
#define inf 998244353
#define N 110000
#define M 210000
int main()
{
    int k;
    cin>>k;
    int n=2*k+2;
    vector<pair<int,int> > e; e.clear();
    vector<int> l,r; l.clear(); r.clear();
    for(int i=1;i<=n;i++)
    if (i&1)l.pb(i); else r.pb(i);
    for(int i=0;i<n/2;i++){
        for(int j=0;j<i;j++)
            e.pb(mp(l[i],r[j])),e.pb(mp(r[i],l[j]));
        e.pb(mp(l[i],r[i]));
    }
    cout<<n<<" "<<e.size()<<" "<<2<<endl;
    for(int i=1;i<=n;i++)
    if (i&1)printf("1 "); else printf("2 "); puts("");
    for(auto p:e)printf("%d %d\n",p.first,p.second);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3792kb

input:

1

output:

4 4 2
1 2 1 2 
1 2
3 2
4 1
3 4

result:

wrong answer The graph is not correct