Location>code7788 >text

CSP-J 2024 Travelogue

Popularity:959 ℃/2024-09-21 13:02:39

CSP-J 2024 Travelogue

Difficulty of questions

Overall, the exam questions were not too difficult for me as a first year livestock. There were a handful of difficult multiple choice questions in the front (Grey Code).

multiple-choice question

Multiple choice came up with a BYD question that messes with people's minds - Grey Code. I was blindsided by this question.

Reader

The reading program is much simpler and less computationally intensive this year than it was in 2023.

The first question is very simple, he gave us three sub-functions a main function. The first function is used to determine if n is prime. The second function is used to determine whether 2The number of primes between n. The third function is used to determine the number of 2The sum of prime numbers between n.

I didn't see what it was doing for the second question for the time being, so I was simulating it directly on the draft paper (a draft paper is the size of an A3 sheet of paper) (the coordinates of the 15 examination room of Chengyang No. 1 Middle School, and I asked for a total of three draft papers at that time,)Invigilator's inner OS: This kid is a human computer, right?) It's really possible to simulate it eventually.

The third question I presume is used to calculate the sum of a*b. Only written using recursion.

The source code looks like this

int c(int a,int b){// function name forgotten
if(b==0){
return a;
}
return a+c(a,b-1);
}

At the time, I wasn't sure what the program would be used for, so I still manually mocked it up on draft paper. (Invigilator: Don't come over here!!!!

When I did the reflection I was surprised to find that this year's questions were all one-dimensional arrays or single-level for loop questions, with no two-dimensional arrays or nested for loops. This is great news for me who is not good at math.

complete the blanks

The two questions in the completion blanks are equally easy, the first one is forgettable, and the second one is a Hannukah tower problem, done with recursion. Anyone who has studied recursion should be able to do it.