結果
問題 |
No.131 マンハッタン距離
|
ユーザー |
|
提出日時 | 2015-05-15 14:32:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 237 bytes |
コンパイル時間 | 417 ms |
コンパイル使用メモリ | 54,512 KB |
実行使用メモリ | 10,148 KB |
最終ジャッジ日時 | 2024-07-06 03:56:13 |
合計ジャッジ時間 | 6,819 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | TLE * 1 -- * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:15: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] 18 | cout<<count<<endl; | ^~~~~
ソースコード
#include <iostream> using namespace std; int main(){ int x,y,d,count; cin>>x>>y>>d; for (int i = 0; i < x+1; ++i) { for (int j = 0; j < y+1; ++j) { if (i+j == d) { count++; } } } cout<<count<<endl; return 0; }