提出 #48366076
ソースコード 拡げる
#include<bits/stdc++.h>
#define LL long long
#define Un unsigned
#define For1(i,a,b) for(i=(a);i<=(b);++i)
#define For2(i,a,b) for(i=(a);i<(b);++i)
#define FoR1(i,a,b) for(i=(a);i>=(b);--i)
#define FoR2(i,a,b) for(i=(a);i>(b);--i)
#define pii std::pair<int,int>
#define mkp std::make_pair
#define fir first
#define sec second
#define pb emplace_back
#define il inline
#define dbg(x...) fprintf(stderr,x),fflush(stderr)
#define FI using std::cin;std::ios::sync_with_stdio(0),cin.tie(0)
template<class T1>
il void cmin(T1 &x,T1 y){if(x>y)x=y;}
template<class T1>
il void cmax(T1 &x,T1 y){if(x<y)x=y;}
const int N=111;
int n,s,k,ans;
signed main(){FI;int i,t1,t2;
cin>>n>>s>>k;
For1(i,1,n)cin>>t1>>t2,ans+=t1*t2;
if(ans<s)ans+=k;
printf("%d",ans);
return 0;
}
提出情報
| 提出日時 |
|
| 問題 |
A - Online Shopping |
| ユーザ |
bear203 |
| 言語 |
C++ 20 (gcc 12.2) |
| 得点 |
100 |
| コード長 |
789 Byte |
| 結果 |
AC |
| 実行時間 |
1 ms |
| メモリ |
3828 KiB |
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
100 / 100 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
example_00.txt, example_01.txt, example_02.txt |
| All |
example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| example_00.txt |
AC |
1 ms |
3640 KiB |
| example_01.txt |
AC |
1 ms |
3692 KiB |
| example_02.txt |
AC |
1 ms |
3760 KiB |
| hand_00.txt |
AC |
1 ms |
3760 KiB |
| hand_01.txt |
AC |
1 ms |
3644 KiB |
| hand_02.txt |
AC |
1 ms |
3760 KiB |
| random_00.txt |
AC |
1 ms |
3612 KiB |
| random_01.txt |
AC |
1 ms |
3828 KiB |
| random_02.txt |
AC |
1 ms |
3712 KiB |
| random_03.txt |
AC |
1 ms |
3764 KiB |
| random_04.txt |
AC |
1 ms |
3828 KiB |
| random_05.txt |
AC |
1 ms |
3652 KiB |
| random_06.txt |
AC |
1 ms |
3640 KiB |
| random_07.txt |
AC |
1 ms |
3756 KiB |
| random_08.txt |
AC |
1 ms |
3608 KiB |
| random_09.txt |
AC |
1 ms |
3644 KiB |
| random_10.txt |
AC |
1 ms |
3588 KiB |
| random_11.txt |
AC |
1 ms |
3628 KiB |
| random_12.txt |
AC |
1 ms |
3608 KiB |
| random_13.txt |
AC |
1 ms |
3640 KiB |
| random_14.txt |
AC |
1 ms |
3596 KiB |
| random_15.txt |
AC |
1 ms |
3640 KiB |
| random_16.txt |
AC |
1 ms |
3568 KiB |
| random_17.txt |
AC |
1 ms |
3824 KiB |
| random_18.txt |
AC |
1 ms |
3704 KiB |
| random_19.txt |
AC |
1 ms |
3640 KiB |