結果
| 問題 | No.514 宝探し3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-06 00:07:27 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 298 ms |
| コンパイル使用メモリ | 70,388 KB |
| 最終ジャッジ日時 | 2026-03-31 01:33:20 |
| 合計ジャッジ時間 | 658 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main(int, const char**)':
main.cpp:11:23: error: 'uint32_t' has not been declared
11 | auto f = [&](uint32_t x, uint32_t y) {
| ^~~~~~~~
main.cpp:5:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
4 | #include <map>
+++ |+#include <cstdint>
5 |
main.cpp:11:35: error: 'uint32_t' has not been declared
11 | auto f = [&](uint32_t x, uint32_t y) {
| ^~~~~~~~
main.cpp:11:35: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp:19:9: error: 'uint32_t' was not declared in this scope
19 | uint32_t d0 = f(0, 0);
| ^~~~~~~~
main.cpp:19:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp:20:17: error: expected ';' before 'd1'
20 | uint32_t d1 = f(d0, 0);
| ^~~
| ;
main.cpp:21:17: error: expected ';' before 'x'
21 | uint32_t x = d0 - d1 / 2, y = d1 / 2;
| ^~
| ;
main.cpp:22:17: error: expected ';' before 'd2'
22 | uint32_t d2 = f(x, y);
| ^~~
| ;
ソースコード
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
using namespace std;
int main(int argc, const char* argv[])
{
bool flag = false;
auto f = [&](uint32_t x, uint32_t y) {
if (flag) return 0;
cout << x << " " << y << endl;
int d;
cin >> d;
if (d == 0) flag = true;
return d;
};
uint32_t d0 = f(0, 0);
uint32_t d1 = f(d0, 0);
uint32_t x = d0 - d1 / 2, y = d1 / 2;
uint32_t d2 = f(x, y);
return 0;
}