結果

問題 No.3678 しゃべりすぎた男
コンテスト
ユーザー A
提出日時 2026-09-05 21:27:57
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 443µs
コード長 1,430 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,832 ms
コンパイル使用メモリ 351,308 KB
実行使用メモリ 9,780 KB
最終ジャッジ日時 2026-09-05 21:28:04
合計ジャッジ時間 6,188 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
// #include<atcoder/all>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i,s, n) for (int i = (s); i < (n); i++)
#define ALL(x) x.begin(),x.end()
#define rALL(x) x.rbegin(),x.rend()
using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;
// using mint = atcoder::modint998244353;
// using Mint = atcoder::modint1000000007;
const ll INF = 1LL << 60;
const ll inf = 1E9 + 7;
const ll MOD = 998244353;
const ll mod = 1E9 + 7;
const ll int_max = 1LL << 32;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b;return true; }return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b;return true; }return false; }
template <class T>inline ll pair2idx(T x, T y, T n) { return (ll)x * n + y; }
template <class T>inline pair<int, int> idx2pair(T idx, T n) { return { idx / n, idx % n }; }

long long _pow(long long x, long long n) {
    long long ret = 1;
    while (n > 0) {
        if (n & 1) ret *= x;
        x *= x;
        n >>= 1;
    }
    return ret;
}

int main(){
    vector<int>t(7);
    rep(i,7)cin>>t[i];
    int solve_time=0;
    rep(i,7){
        if(t[i]==-1)solve_time+=100000000;
        else solve_time+=t[i];
        if(solve_time<=6000){
            cout << 6000-solve_time<<endl;
        }else{
            cout << -1<<endl;
        }
    }
}
0