--- tags: IOI --- # IOI2010 Day1-1 Cluedo (クルード) IOI で一番簡単な問題 ## 問題 https://www.ioi-jp.org/ioi/2010/tasks/tasks_jpn/day1/t1_cluedo/index.html ← pdf じゃない どうして… https://oj.uz/problem/view/IOI10_cluedo 犯人の候補が6人、場所の候補が10個、凶器の候補が6個ある。 100回まで以下のクエリを送ることができる。 - (犯人, 場所, 凶器) の組を送る。 - 1 が返ってきた場合は犯人が間違っている。 - 2 が返ってきた場合は場所が間違っている。 - 3 が返ってきた場合は凶器が間違っている。 犯人、場所、凶器を特定せよ。 ## 実装 やるだけ https://oj.uz/submission/231664 ```cpp #include "grader.h" #include "cluedo.h" void Solve(){ int a = 1, b = 1, c = 1; while(true){ int q = Theory(a, b, c); if(q == 1) a++; else if(q == 2) b++; else if(q == 3) c++; else return; } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up