Submission #50841001
Source Code Expand
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.lang.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
//String str = scan.next();
int a = scan.nextInt();
int b = scan.nextInt();
int ans=1;
int [] vec=new int[a];
int[] vec2=new int[a];
int temp=0;
boolean check=true;
for(int i=0;i<a;i++)vec2[i]=1;
for(int i=0;i<b;i++){
check=true;
int c = scan.nextInt();
int d = scan.nextInt();
temp = vec[c-1] + d;
System.out.println(temp);
for(int j=0;j<a;j++){
if(temp == vec[j]){
check=false;
if(vec2[c-1]==1){
vec2[c-1]=0;
ans--;
}
break;
}
}
if(check){
ans++;
if(vec2[c-1]==0)vec2[c-1]=1;
}
System.out.println(ans);
vec[c-1]=temp;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - Diversity of Scores |
| User | ikematsu |
| Language | Java (OpenJDK 17) |
| Score | 0 |
| Code Size | 1015 Byte |
| Status | WA |
| Exec Time | 2215 ms |
| Memory | 66520 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 02_max_00.txt, 02_max_01.txt, 03_killer_00.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | WA | 65 ms | 37764 KiB |
| 00_sample_01.txt | WA | 66 ms | 38044 KiB |
| 00_sample_02.txt | WA | 65 ms | 37836 KiB |
| 01_random_00.txt | WA | 1167 ms | 65836 KiB |
| 01_random_01.txt | WA | 1323 ms | 63128 KiB |
| 01_random_02.txt | TLE | 2211 ms | 65320 KiB |
| 01_random_03.txt | TLE | 2211 ms | 64916 KiB |
| 01_random_04.txt | TLE | 2211 ms | 65336 KiB |
| 01_random_05.txt | TLE | 2211 ms | 64540 KiB |
| 01_random_06.txt | TLE | 2211 ms | 65300 KiB |
| 01_random_07.txt | TLE | 2209 ms | 65108 KiB |
| 01_random_08.txt | TLE | 2211 ms | 65284 KiB |
| 01_random_09.txt | TLE | 2211 ms | 65184 KiB |
| 01_random_10.txt | TLE | 2211 ms | 65336 KiB |
| 01_random_11.txt | TLE | 2211 ms | 64432 KiB |
| 01_random_12.txt | TLE | 2211 ms | 65180 KiB |
| 01_random_13.txt | TLE | 2215 ms | 63176 KiB |
| 01_random_14.txt | TLE | 2211 ms | 65136 KiB |
| 01_random_15.txt | TLE | 2211 ms | 63908 KiB |
| 02_max_00.txt | TLE | 2211 ms | 65104 KiB |
| 02_max_01.txt | WA | 1169 ms | 65800 KiB |
| 03_killer_00.txt | TLE | 2211 ms | 66520 KiB |