結果
問題 | No.131 マンハッタン距離 |
ユーザー |
![]() |
提出日時 | 2015-01-20 23:37:33 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2,324 ms / 5,000 ms |
コード長 | 675 bytes |
コンパイル時間 | 766 ms |
コンパイル使用メモリ | 83,464 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-22 23:20:47 |
合計ジャッジ時間 | 15,870 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>#include <cstdio>#include <cstring>#include <sstream>#include <algorithm>#include <math.h>#include <map>#include<functional>#include <iomanip>#include <vector>#include <queue>#include <set>#include <typeinfo>#define PI 3.14159265359#define INF 99999999;#define rep(i, n) for(int i=0; i<n; i++)#define REP(n) rep(i, n)#define EPS 1e-10typedef long long ll;using namespace std;/*class Target{public:vector <string> draw(int n){}};*/int main(){int x, y, d;int xx, yy, num = 0;cin >> x >> y >> d;for (xx=d; xx>=0; xx--){yy = d - xx;if (xx <= x && yy <= y) num++;}cout << num << endl;return 0;}