QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#137274 | #2358. What? Subtasks? Again? | Vengeful_Spirit# | WA | 1ms | 3872kb | C++20 | 609b | 2023-08-10 09:10:28 | 2023-08-10 09:10:30 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
vector<int>e[5];
int vis[N];
int main(){
int n,m,k;
scanf("%d%d%d",&n,&m,&k);
for(int i=1;i<=k;i++){
int x,y;
scanf("%d%d",&x,&y);
y--;
e[y].push_back(x);
}
int ans=-1;
for(int i=0;i<(1<<5);i++){
for(int j=0;j<5;j++){
if(i>>j&1){
for(auto v:e[j])vis[v]=i;
}
}
int cnt=0;
for(int j=1;j<=n;j++){
if(vis[j]!=i)++cnt;
}
if(cnt<=m)ans=max(ans,cnt);
}
if(ans==-1){
puts("Round will be unrated");
}
else{
printf("%d\n",ans);
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3744kb
input:
10 7 10 2 1 3 5 2 1 4 1 9 5 5 4 6 4 7 4 8 4 10 4
output:
6
result:
ok single line: '6'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3872kb
input:
10 9 0
output:
0
result:
wrong answer 1st lines differ - expected: 'Round will be unrated', found: '0'