QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#558037#8934. Challenge NPCleafmaple#WA 1ms3752kbC++20955b2024-09-11 13:41:342024-09-11 13:41:34

Judging History

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

  • [2024-09-11 13:41:34]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3752kb
  • [2024-09-11 13:41:34]
  • 提交

answer

#include <bits/stdc++.h>
#define xs(a) cout<<setiosflags(ios::fixed)<<setprecision(a);
#define endl '\n'
using namespace std;
using ll = long long;
const int N=1e6+5;
#define int long long

void solve(){
	int k; cin >> k;
    vector<array<int,2>>edg;
    int cnt = 0;
    /*
        1 2 3
        1 2 3
    */
    int n = 2*k+4;
    for(int i=3; i<=n; i++){
        if(i%2 == 1){
            for(int j=2; j<=n; j+=2) edg.push_back({i, j});
        }else {
            for(int j=1; j<=i-2; j+=2) edg.push_back({i, j});
        }
    }
    cout << n << ' ' << edg.size() << ' ' << 2 << endl;
    cout << "1 1 ";
    for(int i=3; i<=n; i++){
        if(i%2) cout << 1 << ' ';
        else cout << 2 << ' ';
    }
    cout<<endl;
    for(auto [x, y]: edg){
        cout << x << ' ' << y << endl;
    }


}

signed main(){
	cin.tie(0)->sync_with_stdio(0);
	int T; T=1;
	// cin >> T;
	while(T--) solve();
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3752kb

input:

1

output:

6 9 2
1 1 1 2 1 2 
3 2
3 4
3 6
4 1
5 2
5 4
5 6
6 1
6 3

result:

wrong answer The graph is not correct