結果

問題 No.3603 What Question Number Are We On?
コンテスト
ユーザー tAbErU
提出日時 2026-08-03 15:51:35
言語 C++23
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 251µs
コード長 815 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,378 ms
コンパイル使用メモリ 332,896 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-03 15:51:41
合計ジャッジ時間 4,447 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 42
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define yn(ans) cout << (ans ? "Yes" : "No") << "\n"

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int q;cin>>q;
  int t,a,b,cnt=1;
  vector<int> ans;
  while(q--){
    cin>>t;
    if(t==1){
      cin>>a>>b;
      ans.pb(a+b);
    }else{
      ans.pb(cnt);
    }
    cnt++;
  }
  for(int c:ans)cout<<c<<endl;
}
0