QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#613296 | #9446. Construction of Town | ucup-team918# | WA | 0ms | 3704kb | C++17 | 482b | 2024-10-05 13:53:15 | 2024-10-05 13:53:15 |
Judging History
answer
#include <bits/stdc++.h>
#define cerr cout << "in " << __LINE__ << "\t: "
using namespace std;
int n, m, a[110];
signed main() {
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin >> n >> m;
for (int i = 1; i < n; i++)
cin >> a[i];
for (int i = 2; i <= n; i++)
cout << 1 << " " << i << "\n";
m -= n - 1;
for (int i = 2; i <= n; i++)
for (int j = i + 1; j <= n; j++) {
if (m) cout << i << " " << j << "\n";
else return 0;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3640kb
input:
3 2 4 5
output:
1 2 1 3
result:
ok Output is valid. OK
Test #2:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
4 6 12 34 56
output:
1 2 1 3 1 4 2 3 2 4 3 4
result:
ok Output is valid. OK
Test #3:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
2 1 998244353
output:
1 2
result:
ok Output is valid. OK
Test #4:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
3 3 1 10
output:
1 2 1 3 2 3
result:
ok Output is valid. OK
Test #5:
score: -100
Wrong Answer
time: 0ms
memory: 3580kb
input:
5 8 242843383 518993849 724779449 840953559
output:
1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5
result:
wrong answer Participant output contains extra tokens.