結果

問題 No.1422 Social Distance in Train
ユーザー eQeeQe
提出日時 2021-03-12 21:26:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 765 bytes
コンパイル時間 3,581 ms
コンパイル使用メモリ 226,092 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-04 14:29:25
合計ジャッジ時間 4,290 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,384 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define pt(sth) cout << sth << "\n"
#define itr(x,c) for(auto x=c.begin();x!=c.end();x++)
#define all(a) (a.begin()),(a.end())
using namespace std;
#include <atcoder/all>
using namespace atcoder;
typedef long long ll;
typedef pair<ll, ll> pll;
template<class T>bool chmax(T &a, const T &b) {if(a<b) {a=b; return 1;} return 0;}
template<class T>bool chmin(T &a, const T &b) {if(b<a) {a=b; return 1;} return 0;}
static const ll INF=1e18;
static const ll MAX=101010;
//static const ll MOD=1e9+7;
//static const ll MOD=998244353;
//vector<ll> a(N);
//for(i=0;i<N;i++) cin>>a[i];

typedef vector<ll> v1D;
typedef vector<v1D> v2D;
typedef vector<v2D> v3D;


int main(){
  ll i,j;
  
  ll N;cin>>N;
  if(N&1)pt(1);
  else{
    pt(N/2+1);
  }
  
}
0