QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#378643 | #8338. Quad Kingdoms Chess | BUET_POTATOES# | WA | 28ms | 3624kb | C++23 | 882b | 2024-04-06 13:56:34 | 2024-04-06 13:56:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void testcase(int cs){
int n1, n2;
cin >> n1;
vector<int> v[2];
map<int, int> mp[2];
v[0].resize(n1);
for(auto &x : v[0]){
cin >> x;
++mp[0][x];
}
cin >> n2;
v[1].resize(n2);
for(auto &x : v[1]){
cin >> x;
++mp[1][x];
}
int q;
cin >> q;
while(q--){
int o, x, y;
cin >> o >> x >> y;
--o, --x;
if(--mp[o][v[o][x]] == 0){
mp[o].erase(v[o][x]);
}
v[o][x] = y;
++mp[o][y];
if(*mp[0].rbegin() == *mp[1].rbegin())cout << "YES\n";
else cout << "NO\n";
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
int T = 1;
// cin >> T;
for(int cs = 1; cs <= T; ++cs){
testcase(cs);
}
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3624kb
input:
5 1 2 3 4 5 5 5 4 3 2 1 8 1 1 5 1 4 2 1 2 4 1 5 1 1 5 5 2 1 4 2 3 5 2 5 5
output:
NO NO NO YES NO NO NO YES
result:
ok 8 tokens
Test #2:
score: -100
Wrong Answer
time: 28ms
memory: 3576kb
input:
1 2 6 2 1 1 1 1 1 200000 2 6 2 1 1 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 2 4 1 2 1 2 1 1 1 1 1 2 2 5 1 1 1 1 1 1 2 1 1 1 2 6 1 1 1 2 1 1 2 1 1 2 2 3 1 1 1 1 2 1 1 2 6 2 1 1 2 2 4 1 1 1 2 2 6 1 1 1 2 1 1 1 2 5 2 2 6 2 1 1 1 2 4 2 2 5 2 2 6 2 1 1 1 2 5 1 2 6 2 1 1 2 1 1 1 1 1 1 2 4 1 1 1 2 1 1 2 1 1 2 2 3 2...
output:
NO NO NO NO YES YES NO NO NO NO NO NO NO NO NO NO YES YES YES YES NO NO NO YES YES YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES YES YES NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO ...
result:
wrong answer 17th words differ - expected: 'NO', found: 'YES'