QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#424930 | #3284. Medical Checkup | NYCU_template# | WA | 1ms | 3700kb | C++20 | 1.1kb | 2024-05-29 19:58:31 | 2024-05-29 19:58:32 |
Judging History
answer
#include <algorithm>
// #include <bits/stdc++.h>
#include <deque>
#include <cmath>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <set>
#include <map>
#include <tuple>
#include <vector>
using namespace std;
#define ll long long
#define fastio ios::sync_with_stdio(false), cin.tie(0);
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define mkp make_pair
#define sz(a) (ll) a.size()
#define all(x) x.begin(), x.end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define lowbit(x) x &(-x)
const ll MAXN = 4e3 + 5;
// const ll MAXM = 1e2 + 5;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
ll N, T;
ll h[MAXN], pre[MAXN], preMax[MAXN];
void solve(){
cin >> N >> T;
for(int i = 1; i <= N; i++){
cin >> h[i];
pre[i] = pre[i-1] + h[i];
preMax[i] = max(preMax[i-1], h[i]);
}
for(int i = 1; i <= N; i++){
cout << (T - pre[i]) / preMax[i] + 2 << "\n";
}
}
signed main() {
fastio ll T = 1;
// cin >> T;
for (ll i = 1; i <= T; i++) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3620kb
input:
1 0 8404
output:
1
result:
ok single line: '1'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3700kb
input:
1 1 141237625
output:
2
result:
wrong answer 1st lines differ - expected: '1', found: '2'