QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#606767 | #8934. Challenge NPC | UESTC_PenaltyAutomaton# | WA | 2ms | 8284kb | C++14 | 1.3kb | 2024-10-03 12:04:32 | 2024-10-03 12:04:36 |
Judging History
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