ZJOI 迷惑行为大赏
文件相关
搜索 //freopen 共有
奇妙的注释
ZJ-091 太长了,这里不做介绍。
ZJ-105(station.cpp),这个人好傻逼啊,怎么考场不好好做题写游记,写游记也就算了,语法错误还一堆。
#include<bits/stdc++.h>
using namespace std;
int n,m,x;
set<int> lends,rends;
set<pair<int,int> > blocks;
const int inf=0x3f3f3f3f;
int main()
{
freopen("station.in","r",stdin);
freopen("station.out","w",stdout);
//freopen("stations.in","r",stdin);
//freopen("STATIONS.OUT","w",stdout);
scanf("%d%d%d",&n,&m,&x);
blocks.emplace(-inf,-inf);
blocks.emplace(inf,inf);
lends.emplace(inf);
rends.emplace(inf);
for(int i=1;i<=m;i++)
{
//for(auto it:blocks)printf("(%d,%d) ",it.first,it.second);puts("");
int l,r;
scanf("%d%d",&l,&r);
lends.emplace(l);
rends.emplace(r);
auto lt=prev(blocks.upper_bound(make_pair(l,inf)));
auto rt=prev(blocks.upper_bound(make_pair(r,inf)));
if(lt->second>=l)l=lt->first;
else lt++;
if(rt->second>=r) r=rt->second;
//printf("(%d,%d) (%d,%d)\n",lt->first,lt->second,rt->first,rt->second);
blocks.erase(lt,next(rt));
blocks.emplace(make_pair(l,r));
}
//for(auto it:blocks)printf("(%d,%d) ",it.first,it.second);puts("");
//for(auto it:rends)printf("%d ",it);puts("");
auto ans=--blocks.upper_bound(make_pair(x,inf));
for(auto it=lends.lower_bound(ans->first);*it<x;it++)
printf("%d ",*it);
for(auto it=rends.upper_bound(x);*it<=ans->second;it++)
printf("%d ",*it);
return 0;
}
/*
9:48 Problem A was finished, including an accident in my computer, solved after calling the staffs.
Well, I should have learnt how to compare two files in Linux, and how to type Chinese characters.
There's a naive way to compare, though - you open the sublime text and use Ctrl+F to find out if there's a match.
Estimated score is 100+0+36, even higher than my NOIP.
Among them, T3 is solved by a naive O(nm log^2 n) solution:
you just simply maintain a heap of already-occupied leader, and whenever you finds a leader better than anyone in the subtree, you replace that person.
To maintain the heap, you can merge the heap with some tricks: always let elements in the smaller heaps insert into the bigger ones.
The run time in Testcase 11 is about 9 sec. I tried to optimize the constant, but in vain.
Ah, I've got the idea now: we can merge SGTs instead of priority_queues, which saves a log.
Away from OI for months, I'm not sure if I can do it.
11:53 Oh, I've found the method to type Chinese characters. 再见,OI。But I've already typed a range of stuff, so I'll continue to type in English.
12:36 I gave up SGT. In NOI2022 we've known that SGT merging is slower than my pq merging. My attempt should be pointless.
What you're looking is moaning from a student in Senior 2. Losing 272 pts in NOIP, he have no hope for getting into NOI.
Last year I've already known that, but this time I want to end my OI life.
My dad insisted it's a waste of time, though. My coach is on my side.
I started learning C++ when I was in 6th grade. At that moment, I was attracted by the amazing works made by people in HFLS.
Also, my dad said I could go to good universities if I've got the first prize. Then I went to learn programming.
In junior 1, I won a second prize in NOIP2018-J by 190pts, losing all the points because of not initializing the counter.
In junior 2, I won a second prize in CSP2019-S by 259pts, and AKed CSP2019-J.
At that moment I thought, if only I'd calculated the memory correctly - then I'll get my first first prize in junior high.
A year later, I spent 2hrs on julian and successfully get 0 points. That year I got 0+100+0+0 pts.
My coach talked to me several times. He said Chen Lijie, also graduated from HFLS, who was in the 1st place in IOI2013, was once disappointed by not having done a good job, either.
I compared myself to him. He like rhythm games, too. I was inspired,expecting myself to be the next sparkle after 10 years of silence.
It seems that The road got wider. In CSP2021 I got my first 1= (100+0+100+45), and in NOIP I got 216pts (100+100+16+0).
I thought there was a bright future, since I could get 88pts in variance, just a matter of n and n-1.
But I was wrong. I've got no highlight since then, until this contest.
With hope, I even kept away from school for 3 weeks, going extreme to prepare for NOIP.
Today is April Fool, and probably the NOIP2022 itself is a joke - 128pts, for not having T3 correct. I've just been tricked to this school again, burying myself, being a clown struggling for no reason.
I used to be someone struggling until the last minute, but today I'm just an observer, looking at phenomenons occurred around me.
It's hard to say what had I obtained from OI.
Qiangji was launched out of the blue. I felt blue. I thought Provincial 1= makes no sense.
However, I found out that 1= isn't as trivial as I've thought. I'm trying to attend to Westlake University - at least the acceptance rate is higher than Golden Medal.
Sometimes I thought OI is only a fragile bubble. When broken, all the welcoming outside will fade immediately.
2023/4/1 Task Achieved: Use Linux in a contest.
2023/4/1 Task Failed: Meet 九条可怜 again in spring outing.
2023/4/1 Task Failed: Have a contest out of HZ.
Zip file password: up@up#up$1234
PDF file password: flood#head0413
*/