在你面前有
每個箱子裡面都有一個數字
換句話說箱子裡的數字,
本題為互動題,你必須要使用給定的函式求出這些數字的中位數在哪個位置。
請先引入標頭檔 #include "lib1617.h"</font>
=====================
int Get_Box( void )
:在作任何操作之前請先呼叫這個函式,會回傳n的數值。
int Med3( int a, int b, int c )
:會回傳一個數字
void Report( int a )
:表示全部
本題無需輸入,任何輸入動作會導致你得到一個 WA。
本題無需輸出,請 Report 答案。
一個完全不會AC的範例程式:
#include <cstdio>
#include "lib1617.h"
int n, ans;
int main(){
n = Get_Box();
ans = Med3(1, 2, 3);
Report(ans);
}
=====================
一些導致 WA 的原因:
Get_Box()
。Med3()
,例如說三個數有重複的數值或是有 Med3()
超過 Report()
的答案錯誤。程式會在每次呼叫 Med3()
時引入一定量的延時,而時限也有做相對應的放寬。
原TIOJ1617 / Problem Setter:ATP
Source:IOI 2000 Day 1
2021.05.01 Update: Added
No. | Testdata Range | Score |
---|---|---|
1 | 0 | 20 |
2 | 1 | 20 |
3 | 2 | 20 |
4 | 3 | 20 |
5 | 4 | 20 |