QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#424887 | #3284. Medical Checkup | NYCU_template# | WA | 0ms | 3948kb | C++20 | 1.2kb | 2024-05-29 19:31:59 | 2024-05-29 19:32:00 |
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;
double 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]);
}
ll p = 0;
for(int i = 1; i <= N; i++){
cout << ceil(max((T - pre[i]) + 0.5, 0.5) / preMax[i]) + 1 << "\n";
}
}
signed main() {
fastio ll T = 1;
// cin >> T;
for (ll i = 1; i <= T; i++) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3948kb
input:
1 0 8404
output:
2
result:
wrong answer 1st lines differ - expected: '1', found: '2'