FG的博客

CSP2020-J/S

posted on 2020-10-11 18:04:45 | under 游记 |

初赛

Day 1

15题看下来，确定的只有3-6道，~~剩下只能看脸（危）~~

az

下午PJ

wyf说：今年你PJ没1=就别学了吧

AFO，/kk

2020.10.17

kzy 70，又小又比我强

lt 77 nm要点脸吧

czy大佬60没进，哎，默哀默哀

TG没过，48.5，丢脸（wtcl

TG再见，lt大佬推荐上去了

Fighting

复赛

Day -7

#include <iostream>

using namespace std;

const int N = 1e5+7;

struct ticket{
int t, price;
bool used;
} a[N];

int main()
{
cin >> n;
for (int i = 1, op, price, t; i <= n; i ++)
{
bool flag = 0;
cin >> op >> price >> t;
if(!op)
{
a[++tail].price = price;
a[tail].t = t;
a[tail].used = 1;
}
else
{
for (int j = head; j <= tail; j ++)
{
if(a[j].price >= price && a[j].used)
{
a[j].used = 0;
flag = 1;
break;
}
}
}
if(!flag)
ans += price;
}
cout << ans << endl;
return 0;
}

Day -6

模拟赛现场

T1，T2，T4 1h打完秒过

AK稳了，还有2.5h，就一个T3能奈我何？

T1找规律秒切

T2看了一眼好麻烦，扔了

T3不清楚

T4emm，放弃再见

kzy大佬给了提示后用大根堆即可AC，试了试，真的，kzy好强啊！！！！！

T2看了下，发现不难，就是细胞的升级版而已

nm100分，老师说是PJ难度，我没了啊

Day 1

T1：优秀的拆分

以下是我做这题的内心独白：

0.5h后：我不会做T1

1h后：cnm我还是不会做T1，滚蛋

感觉全FZ都只有我一个这么做：

#include <iostream>
#include <cstdio>
#define inf 0x3f3f3f3f

using namespace std;

int n;
int a[8] = {2, 4, 8, inf};
int b[8] = {8, 16, 32, 64, inf};
int c[8] = {64, 128, 256, 512, inf};
int d[8] = {512, 1024, 2048, 4096, 8192, inf};
int e[8] = {8192, 16384, 32768, 65536, inf};
int f[8] = {65536, 131072, 262144, 524288, inf};
int g[8] = {524288, 1048576, 2097152, 4194304, 8388608, inf};
int cnt;

inline int num(int x)
{
cnt = 0;
for (int i = x; i; i /= 10)
cnt ++;
return cnt;
}

int main()
{
freopen("power.in", "r", stdin);
freopen("power.out", "w", stdout);
scanf("%d", &n);
if (n % 2)
{
printf("-1\n");
return 0;
}
while (num(n) == 7)
{
for (int i = 1; i <= 5; i ++)
{
if (n == g[i])
{
cout << g[i] << endl;
return 0;
}
if (n < g[i])
{
n -= g[i - 1];
cout << g[i - 1] << " ";
break;
}
}
}
while (num(n) == 6)
{
for (int i = 1; i <= 4; i ++)
{
if (n == f[i])
{
cout << f[i] << endl;
return 0;
}
if (n < f[i])
{
n -= f[i - 1];
cout << f[i - 1] << " ";
break;
}
}
}
while (num(n) == 5)
{
for (int i = 1; i <= 4; i ++)
{
if (n == e[i])
{
cout << e[i] << endl;
return 0;
}
if (n < e[i])
{
n -= e[i - 1];
cout << e[i - 1] << " ";
break;
}
}
}
while (num(n) == 4)
{
for (int i = 1; i <= 5; i ++)
{
if (n == d[i])
{
cout << d[i] << endl;
return 0;
}
if (n < d[i])
{
n -= d[i - 1];
cout << d[i - 1] << " ";
break;
}
}
}
while (num(n) == 3)
{
for (int i = 1; i <= 4; i ++)
{
if (n == c[i])
{
cout << c[i] << endl;
return 0;
}
if (n < c[i])
{
n -= c[i - 1];
cout << c[i - 1] << " ";
break;
}
}
}
while (num(n) == 2)
{
for (int i = 1; i <= 4; i ++)
{
if (n == b[i])
{
cout << b[i] << endl;
return 0;
}
if (n < b[i])
{
n -= b[i - 1];
cout << b[i - 1] << " ";
break;
}
}
}
//cout << n << endl;
while (num(n) == 1 && n > 1)
{
for (int i = 1; i <= 4; i ++)
{
if (n == a[i])
{
cout << a[i] << endl;
return 0;
}
if (n < a[i])
{
n -= a[i - 1];
cout << a[i - 1] << " ";
break;
}
}
}
fclose(stdin);
fclose(stdout);
return 0;
}

T1时间耗太久

T2直接没时间想正解

tt神仙用线段树%%%

lzx神仙用桶O(N)

T3：表达式

cnm老子不会后缀表达式！！！（其实讲过，只是我忘了

T4：方格取数

dfs复杂度多少我不知道

总结： 这次考试的题目似乎比去年难，去年的题目T1人均手切，今年没有（好吧只有我一个没有，wtcl），T2应该比去年简单，T3比去年难多了，T4比去年简单吧

我即将AFO，嘤嘤嘤

2019CSP的时候，我一切还未知

Was it all in my fantasy？

I don't know

Maybe it was，我这一年付出了许许多多的努力，我也看到了进步

Maybe it wasn't，因为到头来我还是pj2=，去年也是2=，我还是和去年一样

I lost many things.

I will fall into the darkside

but I'm not alone

All the things fall down.

I will take aim and fire away and I'm on my way.