09-21 Today, after the preliminary round, obviously feel the math threshold become higher, have high school math knowledge to ensure that understand the meaning of the problem, just bitter elementary and junior high school students, look at the data to participate in the number of people also went up 50%, as a right to pull down the score line it. With a small Turing estimate of 70. should be steady.
09-28 Score came out just shy of 70, solid pass. Surprisingly, it was within a point of what Turing Jr. estimated.
10-25
The night before the resumption of the competition, the suspension of the competition students have gone home to rest, only Xiao and I in the empty computer room for the last little bit of light and chase, that is the ideal, the dream, really can not talk about it, but it is indeed my obsession to pursue. The school or non-stop, merging or not merging, are just the pursuit of what we want.
Listening to the switchboard buzzing in the engine room, may not be able to listen to a few times, let them all with the passing of the water, trickling into the distance it, leaving me to stay and stop and stare. Only can't let go, not let go.
War? Fight! With the humblest of dreams.
To the whimpering and roaring in the darkness of the night
Who says a hero stands in the light?
Reality plays havoc with ideals.
I lost without defense.
Piling up the tombstones of life with my own hands
Tiredness while breaking the siege.
Sincerity for hypocrisy. Sincerity for tears.
How sad.
Keyboards fly under your hands, characters form running sets, hope doesn't always come, running doesn't always yield results, but every time a program is run, every time a bug is eliminated, we are one step closer to breaking through the chains of darkness.
If you don't blow a zero tomorrow, it's a show of strength. I would also like to wish all my partners the best of luck in their endeavors!
10-26
I didn't get up until after 8am, mainly because my mind was not clean and I was fantasizing. Watered down a bit in the morning, reviewed shortest circuits, linear sieve, nearest common ancestor Lca, simulated annealing, and ended up not getting any of them (T3 hit a simulated annealing, or was it purely random?).
After dinner and 20 minutes of sleep, I set off for Chengdu Foreign Language School. When I arrived, I found that everyone else had gone in first, so I said hello to Mr. Zeng and went in. Rich private schools are really different, with inspirational quotes everywhere, plaques at every door, and a statue of Confucius.
Finally realized that I was ahead of them, supposedly because they had an excellent leader? Most of the students were in this one exam room, and after getting on the computer, I found out that the computer configuration wasi3-6100
I can't help it, no, it's weaker than my laptop, can it run a virtual machine? I used virtualBox, and it really didn't work smoothly, and the window resolution was not adaptive, so I gave up on the virtual machine.
2:30 on time to start the examination, a student on the right came up and began to praise me big brother, saying that before the examination has not yet begun to hit the pair of racket (and did not use) really a little impact on the state of mind.
T1
It was indeed simple enough, even the monsters had the same offense and defense, in buckets, in a sorted order, just add them from smallest to largest, beat all the previous monsters, and become added monsters themselves. Took about 30 minutes.
Race time AC codes and notes:
#include<bits/stdc++.h>
using namespace std.
/* Be sure to stay steady and don't rush, especially not the person next to you!
Each monster can only attack once with its own attack power .
And note that the monsters have the same attack power and defense power, making this question even easier!
As per inertia, the first question uses barrels, and the run ends at 1e5
*/
#define N 200000
int tong[N],n.
int main(){
freopen("", "r",stdin); freopen("", "w",stdout); int main(){
scanf("%d",&n); int maxn=0; int maxn=0; int tong[N],n; main(); main()
int maxn=0;
for(int i=1;i<=n;i++){
int x;scanf("%d",&x);
tong[x]++;
maxn=max(maxn,x);
}
int ans=0;
for(int i=1;i<=maxn;i++){
ans=max(0,ans-tong[i])+tong[i];
}
printf("%d",ans);
return 0; }
}
T2
I'm glad to make T2, need to use the knowledge of high school physics, for the number of speeding cars is very good to deal with, for each car, we just need to record his speeding interval, and then determine whether there is a speeding point in this interval, I used the tree data statistics, and later found that the1e6
The size of the data directly in buckets is fine. Then dichotomize the two endpoints of the speeding interval to land on the speeding point, since it makes no sense to be in the middle, and subsequently sort by the right endpoints, looking at the left endpoint each time to see if the left endpoint has been activated by the previous right endpoint, and if it hasn't, activate that right endpoint.
One of the problems was the rounding of the speeding intervals, which was a bit tricky, and it took 2 hours of tweaking to finally pinpoint the problem and fix it.
Race time AC codes and notes:
#include<bits/stdc++.h>
using namespace std;
/* Interesting, very interesting acceleration topic, linked to the real world, not hard though
It's not hard, but it's a good one.
1 hour later 15:30 Finally, I've got some ideas.
First of all, each car has a speeding interval, for a car, we only need this interval
Whether it is recorded or not, directly to the speedometer to do the prefix sum, to see whether there can be
For the most closed speedometer, we can think about the least open speedometer
Use two-bit partial order, sort by the right endpoint of each interval, see if the left endpoint was activated by the previous one
If not, activate the right endpoint
Welp, I've hit it, I'll go back and write the solution to the problem */
#define N 200000// Note the road length 1e6, discretized
#define M 1000100
#define LL long long
int n,m,L,V,p[N].
int d[N],v[N],a[N],l[N],r[N].
int tree[M],car,car2,ans.
bool vis[N],flag;
typedef pair<int,int> PII.
priority_queue<PII,vector<PII>,greater<PII> >e;
int lowbit(int i){
return i & (-i);
}
void update(int i,int k){
while(i<=L){
tree[i]+=k.
i+=lowbit(i);
}
}
int query(int i){
int res=0; while(i>0){
while(i>0){
res+=tree[i];
i-=lowbit(i);
}
return res; }
}
int dis(LL v1,LL v0,LL aa){
return (v1*v1-v0*v0)/(2*aa);//upward rounding
}
signed main(){
freopen("", "r",stdin);
freopen("", "w",stdout);
ios::sync_with_stdio(false);(0),(0);
int T;cin>>T.
while(T--){
car2=car=ans=0;flag=0;
cin>>n>>m>>L>>V;
memset(tree,0,(L+10)*sizeof(int));
memset(vis,0,sizeof(vis)); memset(tree,0,(L+10)*sizeof(int))
for(int i=1;i<=n;i++){
cin>>d[i]>>v[i]>>a[i];
if(a[i]>0){
if(v[i]>V){
l[i]=d[i];r[i]=L;
}else{
l[i]=min(d[i]+dis(V,v[i],a[i]),L)+1;
r[i]=L;
}
}else if(a[i]<0){
if(v[i]>V){
l[i]=d[i]; r[i]=d[i]+(V*V-v[i]*v[i])/(2*a[i]);
if((v[i]*v[i]-V*V)%(-2*a[i])==0) r[i]--;
r[i]=min(L,r[i]);
}else{
l[i]=r[i]=-1;
}
}else{
if(v[i]>V){
l[i]=d[i]; r[i]=L;
}else{
l[i]=r[i]=-1;
}
}
}
for(int i=1;i<=m;i++){
cin>>p[i].
if(p[i]==0){
flag=1;
continue.
}
update(p[i],1); }
}
for(int i=1;i<=n;i++){
// printf("|||%d %d\n",l[i],r[i]);
if(query(r[i])-query(l[i]-1)>0){
car++;
vis[i]=1;
}
if(!l[i]&&flag){
l[i]&&flag){ car++;
vis[i]=1;
}
}
for(int i=1;i<=n;i++){
if(!vis[i]) continue;
int at=lower_bound(p+1,p+1+m,l[i])-p;
l[i]=at;
at=upper_bound(p+1,p+1+m,r[i])-p-1;
r[i]=at;
(r[i],l[i]);
// printf("|%d %d\n",l[i],r[i]);
}
int last=0;
while(! ()){
int le=().second,ri=().first;
first; ().
// printf("|%d %d\n",le,ri);
if(le<=last) continue;
first; (); // printf("|%d %d\n",le,ri); if(le<=last) continue; ans++;
last=ri.
}
cout<<car<<' '<<m-ans<<endl;
}
return 0; }
}
T3
insofar as\(n\le 15\) When enumerating violently, set\(1\) cap (a poem)\(0\) blue and red, respectively, and then from\(1\) Enumeration to\(2^{n-1}\) The binary counterpart of the
The complexity is namely\(2^{14}=16384\)
unfortunately\(2^{100}=1267650600228229401496703205376\), can only get past the first data range, which is the first four points, with 20 points.
The rest is just messing around, using a simulated annealed board, but it's actually purely random, the data is weakly fishing for two points, but it's actually been expected that the strength of the CCF's data is pulled full. It seems to be less than or equal to this data range, in fact, are top full. Last year's T4 violence is not expected small data are bursting!\(int\) Up.
Race time 20-minute code:
#include<bits/stdc++.h>
using namespace std;
/*Violence plus simulated annealing GO*/
#define N 200000
int n,a[N],ans,T;
bool pos[N];
mt19937 rnd(random_device{}());
void baoli(){
for(int k=0;k<=(1<<(n-1));k++){//be tantamount to1because ofblue
int red=-1,blue=-1;
int res=0;
for(int i=0;i<n;i++){
if(k&(1<<i)){
if(blue>=0&&a[blue]==a[i]) res+=a[i];
blue=i;
}else{
if(red>=0&&a[red]==a[i]) res+=a[i];
red=i;
}
}
ans=max(ans,res);
}
}
int check(){
int red=-1,blue=-1;
int res=0;
for(int i=0;i<n;i++){
if(pos[i]){
if(blue>=0&&a[blue]==a[i]) res+=a[i];
blue=i;
}else{
if(red>=0&&a[red]==a[i]) res+=a[i];
red=i;
}
}
return res;
}
void stimulate_fire(){
double tem=1000,d=0.997;
memset(pos,0,(n+1)*sizeof(bool));
while(tem>1e-6){
tem*=d;
int rand=rnd()%n;
pos[rand]^=1;
ans=max(ans,check());
}
}
void stimulate(){
for(int i=1;i<=10;i++)
stimulate_fire();
}
int main(){
freopen("","r",stdin);
freopen("","w",stdout);
scanf("%d",&T);
while(T--){
ans=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
}
if(n<=15){
baoli();
}else{
stimulate();
}
printf("%d\n",ans);
}
return 0;
}
T4
There really wasn't time to look at it, it seemed like there was a 12 point partial score.
The last remaining1:21
When I saw that the first three questions were submitted and turned green, but the fourth question was white, I thought this is not good, so I typed a line.
The fourth question code at the time of the race:
// Estimated score 220, wait for the flowers to bloom, goodbye CSP2024, great competition career, goodbye!!!!
and what happened next... (in fiction)
Due to the change in CCF policy this year, only the crypto player code was released, so I can't estimate the score this time, but the score for those who did it is 220.
CCF: We're going to do clean races!
11-02
Announced the results, 100 + 100 + 20 = 220, but see the small Turing estimate of the Sichuan Province score line is 260, which is cool.
However, Mr. Tsang said that the score line should be around 180-200, and there should still be hope, so it seems that Little Turing's data is still too watery.
11-08
Finish writing this blog to here.
Continuously More Row ......
Links:/2024/10/