結果

問題 No.131 マンハッタン距離
ユーザー Rp7rfRp7rf
提出日時 2015-01-20 23:59:15
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 1,527 ms
コンパイル使用メモリ 59,360 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 02:36:34
合計ジャッジ時間 10,593 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 1,242 ms
4,380 KB
testcase_04 AC 1,239 ms
4,380 KB
testcase_05 AC 1,304 ms
4,376 KB
testcase_06 AC 1,294 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 1 ms
4,380 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 661 ms
4,380 KB
testcase_24 AC 68 ms
4,380 KB
testcase_25 WA -
testcase_26 AC 1,507 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
#include<cmath>
#define rep(i,a) for(int i = 0 ; i < a ; i ++)
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
using namespace std;
int main(void){
  long x,y,d;
  cin>>x>>y>>d;
  int res = 0;
  for(int i = 0 ; i <= d ; i ++){
    if(d<= x &&  d-i<=y)res ++;
  }
  cout<<res<<endl;
}
0