当前位置:网站首页>Notes for csp-j / s 2020

Notes for csp-j / s 2020

2020-11-09 12:53:22 osc_lnhxmt4i

Write only the things that are easy to notice , If you have stressed it many times, don't write it .

Before the game

  1. Try to arrive as early as possible , Don't be late .
  2. Never take a negative mood , Or it will explode 0.
  3. meditation , Base is not recommended .
  4. Be sure to relax , Be nervous after the exam .
  5. listen 《 You copy 》 Other songs

In the game

About compilation errors

  1. Double underscores are prohibited , such as __gcd
  2. Get the variable name in Chinese , For example pipe Change to guanzi( Be careful not to use size, next, x0, x1, y0, y1, left, right, max, min, time, Otherwise, he will die miserably )
  3. Don't change the code at the end of the exam , To the end CE Is it miserable
  4. Silly , Commit without running
  5. Forget to play NOI Linux It's running

About WA

  1. Turn the array small , Especially not much smaller ( such as int a[200], And then I visited a[200]), There's something magical (UB);
  2. Be sure to take photos , Especially the conclusion question ( Greedy question )、 Data structure and d p dp dp topic , Data needs to be stronger .
  3. The function of judging which part is wrong , It wasn't even written at all
  4. It's hard to empty , detonation 0 Two lines of tears
  5. No special judgment , Especially trees / It's just 1-2 When there are nodes
  6. Overflowed …… Did you take the mold ? Did you write high precision ?
  7. A cause of shame —— Mix fast reading with ios Optimize syn Optimize

About TLE/MLE/RE

RE:

  1. Your array is down , Please turn it up
  2. Your modulus won't be 0 Well ……

MLE:
It's horrible , One point MLE The whole sentence is 0 0 0 Divide up

  1. The array is too big ……
    Be careful ,int You can only drive to 8 × 1 0 7 8×10^7 8×107, long long You can only drive to 4 × 1 0 7 4×10^7 4×107

  2. d f s dfs dfs when :

void dfs(int now,int fath)
{
   
   
	int a[200005];
	for (int i=head[now];i;i=e[i].next)
	{
   
   
		if (e[i].to!=fath)  dfs(e[i].to,now);
	}
}	

When the tree is a chain , Just MLE 了 ……

TLE:

  1. Please identify the time complexity of your program
  2. No use memset, Never use this function , Pit the dead
  3. You're stuck , Optimize it

About unconventional questions

  1. The answer question is not submitted by writing code
  2. Don't play with interactive questions fflush(stdout);

About file manipulation / file name

  1. Check the file operation carefully !
  2. Don't write your admission card number wrong , Then you will AK Become someone else AK 了 ……
  3. Upload failed , Please confirm the number of bytes you submitted with the invigilator after you submit the code .

About strategy

 Insert picture description here
This is a duyi Giant guy's Examination Strategy , The original link is in this

My exam strategy is (CSP-S):
Look at all the questions first .
①T1 Cut off , Or think about it for a while , It should be able to do it anyway , Restriction on 30 30 30 Within minutes
②T2 Fierce and strong , flowers 1.5 h 1.5h 1.5h about , High marks or guarantees AC Look at the rear drive T3
③T3 Fierce and strong , word 1.5 h 1.5h 1.5h about , High marks or guarantees AC Go to see T4
④T4 flowers 15 − 20 15-20 1520 Minutes of violence ;
⑤ Check something , Like file manipulation 、 file name 、 The number of bytes and so on ;
⑥ Check with the invigilator after you hand in the paper , And leave the examination room quickly , Go back to culture class






Particular attention , I am here. T 1 , T 2 , T 3 , T 4 T1, T2, T3, T4 T1,T2,T3,T4 It corresponds to four different levels of difficulty in the test paper , Not in order A , B , C , D A,B,C,D A,B,C,D topic .

About the way of thinking

  1. Be sure to play with the sample !
  2. I won't think twice
  3. Skillfully use root sign divide and conquer
  4. You have to look at the data range ,T1 You don't have to look at the parts ,T2, T3 It is suggested that we should take a good look at some points
    ① what ? n ≤ 100 , t ≤ 1 0 18 n≤100, t≤10^{18} n100,t1018? This is the moment multiplication !
    ② what ? n ≤ 1 0 4 n≤10^4 n104? This is often a card problem or big data structure problem .
    ……


  5. At least think about a topic 30 30 30 minute , You have to think it's simple , Or you can't even think about it .
  6. Mathematical induction 、 Looking for a regular

版权声明
本文为[osc_lnhxmt4i]所创,转载请带上原文链接,感谢