Submission #51007


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<iostream>
using namespace std;
signed main(){
int g,a,b,c[1010],d[1010],e,f=0;
cin >>a>>b;
for(int n=0;n<b;n++){
cin >>c[n]>>d[n];
if(n==0){
e=c[n];
g=n;
}
if(e>c[n]){
e=c[n];
g=n;
}
}
for(int n=0;n<b;n++){
if(g==n){
continue;
}
int m=a-c[n];
if(m>0){
f+=m;
}
}
cout <<f<<'\n';
return(0);
}

ステータス

項目 データ
問題 0593 - ポイントカード (Point Card)
ユーザー名 ei1923
投稿日時 2019-07-02 16:51:00
言語 C++
状態 Accepted
得点 100
ソースコード長 420 Byte
最大実行時間 26 ms
最大メモリ使用量 604 KB

セット

セット 得点 Cases
1 set1 20 / 20 *t2*1.txt
2 set2 20 / 20 *t2*2.txt
3 set3 20 / 20 *t2*3.txt
4 set4 20 / 20 *t2*4.txt
5 set5 20 / 20 *t2*5.txt

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2017-yo-t2-in1.txt AC 25 ms 604 KB
1
2017-yo-t2-in2.txt AC 18 ms 448 KB
2
2017-yo-t2-in3.txt AC 19 ms 540 KB
3
2017-yo-t2-in4.txt AC 20 ms 512 KB
4
2017-yo-t2-in5.txt AC 26 ms 360 KB
5