Submission #56208


ソースコード

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
29
#include<bits/stdc++.h>
#define INF 2147483647
#define inf 1000000007
#define SYOU(x) setprecision(x+1)
#define abs(x,y) (max(x,y)-min(x,y))
#define lol long long
#define mp make_pair
#define fi first
#define se second
using namespace std;
lol a,b;
lol w[111],v[111];
lol mem[111][111111];
lol dp(int n,int m){
if(n==a) return 0;
if(mem[n][m]!=-1) return mem[n][m];
if(m+w[n]>b) return mem[n][m]=dp(n+1,m);
return mem[n][m]=max(dp(n+1,m+w[n])+v[n],dp(n+1,m));
}
signed main(){
cin.tie(0);
ios::sync_with_stdio(false);
lol c=1,d=1,e=0,f=0,g=0,h=0;
string s;
cin >>a>>b;
for(int n=0;n<a;n++) c=c*10;
cout <<(c-1)/b-((c/10)-1)/b<<'\n';
return (0);
}

ステータス

項目 データ
問題 1204 - Password
ユーザー名 ei1923
投稿日時 2019-11-07 16:37:54
言語 C++14
状態 Accepted
得点 10
ソースコード長 708 Byte
最大実行時間 28 ms
最大メモリ使用量 756 KB

セット

セット 得点 Cases
1 ALL 10 / 10 in*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in00-1.txt AC 20 ms 604 KB
1
in00-2.txt AC 21 ms 432 KB
1
in00-3.txt AC 19 ms 512 KB
1
in01.txt AC 16 ms 588 KB
1
in02.txt AC 25 ms 540 KB
1
in03.txt AC 22 ms 488 KB
1
in04.txt AC 21 ms 564 KB
1
in05.txt AC 24 ms 512 KB
1
in06.txt AC 19 ms 592 KB
1
in07.txt AC 28 ms 544 KB
1
in08.txt AC 24 ms 624 KB
1
in09.txt AC 20 ms 448 KB
1
in10.txt AC 22 ms 532 KB
1
in11.txt AC 17 ms 484 KB
1
in12.txt AC 21 ms 560 KB
1
in13.txt AC 18 ms 508 KB
1
in14.txt AC 18 ms 592 KB
1
in15.txt AC 16 ms 540 KB
1
in16.txt AC 17 ms 756 KB
1
in17.txt AC 21 ms 704 KB
1
in18.txt AC 21 ms 528 KB
1
in19.txt AC 21 ms 608 KB
1
in20.txt AC 25 ms 560 KB
1
sample01.txt AC 24 ms 640 KB
sample02.txt AC 21 ms 584 KB