結果
| 問題 | No.131 マンハッタン距離 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-15 14:32:19 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 237 bytes |
| 記録 | |
| コンパイル時間 | 555 ms |
| コンパイル使用メモリ | 71,148 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2026-03-27 14:25:03 |
| 合計ジャッジ時間 | 6,737 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | TLE * 1 -- * 23 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:14:38: warning: 'count' may be used uninitialized [-Wmaybe-uninitialized]
14 | count++;
| ~~~~~^~
main.cpp:5:19: note: 'count' was declared here
5 | int x,y,d,count;
| ^~~~~
ソースコード
#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;
}