QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#606767#8934. Challenge NPCUESTC_PenaltyAutomaton#WA 2ms8284kbC++141.3kb2024-10-03 12:04:322024-10-03 12:04:36

Judging History

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

  • [2024-10-03 12:04:36]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:8284kb
  • [2024-10-03 12:04:32]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
#include <valarray>
#include <cmath>
#include <numeric>
#include <random>

using namespace std;

#define ll long long

const int maxN = 2e5+10, mod = 998244353, inf = 1e9+10;
int k;

ll power(ll x, ll y, ll p){
    ll an = 1;
    while (y){
        if (y & 1) an = an*x % p;
        x = x*x % p;
        y >>= 1;
    }
    return an;
}

ll inv(ll x, ll p){
    return power(x, p-2, p);
}

vector<int> v1[maxN];

void solve() {
    cin >> k;
    int n = 2*k+2, m = 0;
    vector<int> v;
    for (int i = 2; i <= n; i+=2) v.push_back(i);
    for (int i = n-1; i >= 1; i-=2) v.push_back(i);
    for (int i = 0; i < v.size()-1; ++i) {
        for (int j = 1; j+i <= v.size()-1; j+=2) {
            if (v[i] == 2 && v[j+i] == 1) continue;
            m++;
            v1[v[i]].push_back(v[j+i]);
        }
    }
    cout << n << " " << m << " " << 2 << "\n";
    for (int i = 1; i <= n; i+=2) cout << 1 << " " << 2 << " ";
    cout << "\n";
    for (int j = 1; j <= n; ++j) {
        for (auto i:v1[j]) {
            cout << i << " " << j << "\n";
        }
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie();
    int t = 1;
    while (t--) solve();
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 8284kb

input:

1

output:

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

result:

wrong answer The graph is not correct