QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#686490 | #9177. String and Nails | ucup-team4975# | WA | 0ms | 3600kb | C++23 | 1.2kb | 2024-10-29 13:49:13 | 2024-10-29 13:49:13 |
Judging History
answer
#define LOCAL
#include <bits/stdc++.h>
#define fir first
#define sec second
#define el '\n'
#ifdef LOCAL
#define FINISH cerr << "FINISH" << endl;
#else
#define FINISH ;
#endif
#ifdef LOCAL
#define debug(x) cerr << setw(4) << #x << " == " << x << endl
#else
#define debug(x)
#endif
#ifdef LOCAL
#define debugv(x) \
cerr << setw(4) << #x << ":: "; \
for (auto i : x) \
cerr << i << " "; \
cerr << endl
#else
#define debugv(x)
#endif
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
ostream& operator<<(ostream& out, PII& x)
{
out << x.fir << " " << x.sec << endl;
return out;
}
const int mod = 998244353;
const int inf = 0x3f3f3f3f;
const int N = 200020;
void solve()
{
int n;
cin >> n;
vector<PII> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i].fir >> a[i].sec;
}
sort(a.begin(), a.end());
cout << "YES " << el;
for (int i = 0; i < n - 1; i++) {
cout << a[i].fir << " " << a[i].sec << el;
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int T = 1;
cin >> T;
while (T--) {
solve();
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3600kb
input:
3 1 1 2 4 3 1
output:
YES YES 0 0 0 0 0 0 YES 0 0 0 0 0 0
result:
wrong output format Expected integer, but "YES" found