結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
ゼリトキ
|
| 提出日時 | 2025-03-21 21:45:44 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 721 bytes |
| コンパイル時間 | 3,345 ms |
| コンパイル使用メモリ | 272,956 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2025-03-21 21:45:49 |
| 合計ジャッジ時間 | 4,482 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 17 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define INF 9e18;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
ll N,T;
cin>>N>>T;
int t[200009],x[200009];
int K;
for(int i=1;i<=N-1;i++) cin>>t[i];
cin>>K;
ll all=0;
for(int i=1;i<=N;i++) all+=t[i];
for(int i=1;i<=K;i++) cin>>x[i];
for(int i=1;i<=K;i++){
t[x[i]]-=10;
}
if(all<T){
cout<<0<<endl;
return 0;
}
ll now_time=T;
for(int i=1;i<=N-1;i++){
now_time-=t[i];
if(now_time<=0){
cout<<-1<<endl;
return 0;
}
}
cout<<K-(all-T+9)/10<<endl;
}
ゼリトキ