Submission #23908


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<bits/stdc++.h>
using namespace std;
main(){
int a[1001],b;
int n,m,i,j;
int cnt=0;
scanf("%d %d",&n,&m);
for(i=0;i<m;++i){
scanf("%d %d",a+i,&b);
}
sort(a,a+m,greater<int>());
--m;
for(i=0;i<m;++i){
if(a[i]<n)cnt+=n-a[i];
}
printf("%d\n",cnt);
}

ステータス

項目 データ
問題 0593 - ポイントカード (Point Card)
ユーザー名 Arumakan_ei1727
投稿日時 2017-07-31 12:53:10
言語 C++11
状態 Accepted
得点 1
ソースコード長 304 Byte
最大実行時間 15 ms
最大メモリ使用量 664 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
2017-yo-t2-in1.txt AC 10 ms 480 KB
1
2017-yo-t2-in2.txt AC 13 ms 456 KB
2
2017-yo-t2-in3.txt AC 12 ms 436 KB
3
2017-yo-t2-in4.txt AC 10 ms 664 KB
4
2017-yo-t2-in5.txt AC 15 ms 636 KB
5