QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#96195 | #2928. Espresso! | Abdelrahman_K# | WA | 2ms | 3380kb | C++14 | 472b | 2023-04-13 16:56:24 | 2023-04-13 16:56:25 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
const int N = 1e5 + 2;
int main() {
int n, m; cin>>n>>m;
int M = m;
int ans = 0;
for(int i = 0; i < n; i++){
string s; cin>>s;
int x = s[0] - '0' + (s.size() > 1);
if(x <= m){
m -= x;
}
else {
m = M;
ans++;
}
}
cout<<ans;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3320kb
input:
1 10 4L
output:
0
result:
ok single line: '0'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3380kb
input:
15 10 3 2L 3 1 3 2L 3 4 3L 2L 3 1 4 2 4L
output:
3
result:
wrong answer 1st lines differ - expected: '5', found: '3'