結果

問題 No.3678 しゃべりすぎた男
コンテスト
ユーザー
提出日時 2026-09-05 13:03:11
言語 C++23(gcc16)
(gcc 16.1.0 + boost 1.92.0)
コンパイル:
g++-16 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 894 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,931 ms
コンパイル使用メモリ 349,060 KB
実行使用メモリ 9,788 KB
最終ジャッジ日時 2026-09-05 13:03:41
合計ジャッジ時間 3,905 ms
ジャッジサーバーID
(参考情報)
judge4_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 18 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
template <typename K, typename V>
using umap = unordered_map<K, V>;

#define rep(i, n) for (int i = 0; i < n;i++)
#define rep1(i, n) for (int i = 1; i <= n;i++)
#define rrep(i, n) for (int i = n - 1; i >= 0;i--)
#define rrep1(i, n) for (int i = n; i >= 1;i--)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1LL << 60
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n = 7;
    ll sum = 0;
    bool flag = false;
    rep(i, n) {
        ll a;
        cin >> a;
        if (a == -1) {
            flag = true;
        }
        if (flag) {
            cout << -1 << endl;
            continue;
        }
        sum += a;
        cout << 6000 - sum << endl;
    }
}
0