Ran is a Shikigami who can calculate anything in the universe. To do so, she has lots of built-in functions. Today, she decides to give you some example data and the function signature of some functions and leaves YOU to guess the meanings.
All the functions only contain integers as parameters and integer as return value.
On the first line is an integer $case$, the test case number for this test.
On the second line is a single string without space $hint$. Your program should NOT process it as it is used for providing hints to participants and hiding the testcases.
On the third line is an integer $n$, the number of test cases in this test.
Then $n$ lines containing several integers, the parameters for each test case.
Outpit $n$ integers regarding the returns.
Each test case worths 10 points and scoring under each test case is equally divided.
For example, if in a test case, n=5, you get 3 test cases right your score will be 6 for this test case.
int isOdd(int num)
1
Hint
3
2
5
8
0
1
0
Here is a possible solution:
#include <bits/stdc++.h>
using namespace std;
int main(){
int tc;
string ht;
cin>>tc>>ht;
if(tc==1){
int n;
cin>>n;
while(n--){
int x;
cin>>x;
cout<<x%2<<endl;
}
}
}
int fetch(int index, int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9)
2
Hint
3
5 1 9 2 6 0 8 1 7 1 1
0 1 1 4 5 1 4 1 9 1 9
9 123 456 789 987 654 321 0 159 357 24680
8
1
24680
int operationSequence(int base, int andMe, int orMe, int flipIf, int flipIf2, int unsetIf, int setIf)
3
Hint
6
1 0 1 1 0 0 0
1 0 1 1 0 1 1
1 0 1 1 0 1 0
1 0 1 1 0 0 1
0 1 0 0 0 0 0
0 1 1 1 1 0 0
0
1
0
1
0
1
int getSequence(int add1, int add2)
4
Hint
10
1 0
1 1
1 2
0 4
2 2
3 2
1 4
1 5
3 4
10 10
1
1
1
1
1
2
2
3
6
317955