2 xing_mo

尚未进行身份认证

暂无相关简介

等级
TA的排名 12w+

Codeforces Round #622 (Div. 2)

Codeforces Round #622 (Div. 2)http://codeforces.com/contest/1313A - Fast Food Restaurant#include<bits/stdc++.h>using namespace std;int t,a[3];int main(){ scanf("%d",&t); while(t--)...

2020-02-25 00:51:40

C2 - Skyscrapers (hard version),Codeforces Round #622 (Div. 2),单调栈

C2 - Skyscrapers (hard version)http://codeforces.com/contest/1313/problem/C2思路:首先枚举最高楼,由题意可知最高楼的两边都是递减的,现假设最高楼的下标为1,算出最优方案,之后每次将最高楼的下标向右平移,假设当前平移到i,发现要使得最高楼的左边递减,则需要将i左边第一个比它小的位置到i都置为m[i],右边同,这个用单点栈...

2020-02-25 00:51:23

Kanade's convolution,HDU - 6057,FWT

Kanade’s convolution,HDU - 6057https://vjudge.net/problem/HDU-6057/originGive you two arrays A[0…2m−1] and B[0…2m−1].Please calculate array C[0…2m−1]:C[k]=∑i and j=kA[i xor j]∗B[i or j]You just n...

2020-02-19 14:43:03

Binary Table,CodeForces - 662C,FWT,状压

Binary Table,CodeForces - 662Chttps://vjudge.net/problem/CodeForces-662C/originYou are given a table consisting of n rows and m columns. Each cell of the table contains either 0 or 1. In one move, y...

2020-02-19 13:12:11

Super Rooks on Chessboard,UVA - 12633,FFT

Super Rooks on Chessboard,UVA - 12633https://vjudge.net/problem/UVA-12633/originLet’s assume there is a new chess piece named Super-rook. When placed at a cell of a chessboard, itattacks all the ce...

2020-02-19 12:34:33

Hard Nim,HYSBZ - 4589,Nim博弈,FWT

Hard Nim,HYSBZ - 4589https://vjudge.net/problem/HYSBZ-4589/originClaris和NanoApe在玩石子游戏,他们有n堆石子,规则如下:Claris和NanoApe两个人轮流拿石子,Claris先拿。每次只能从一堆中取若干个,可将一堆全取走,但不可不取,拿到最后1颗石子的人获胜。不同的初始局面,决定了最终的获胜者,有些局面下...

2020-02-19 12:13:39

A+B Problem,Kattis - aplusb,FFT

A+B Problem,Kattis - aplusbGiven N integers in the range [−50000,50000], how many ways are there to pick three integers ai, aj, ak, such that i, j, k are pairwise distinct and ai+aj=ak? Two ways are ...

2020-02-19 12:05:54

HDU - 4609 ,3-idiots,FFT

HDU - 4609 ,3-idiotshttps://vjudge.net/problem/HDU-4609/originKing OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that it was a kind o...

2020-02-19 00:14:18

HDU - 1402,A * B Problem Plus,FFT板

HDU - 1402,A * B Problem Plushttps://vjudge.net/problem/HDU-1402/originCalculate A * B.思路:FFT板题,贴个常数很小的板子#include<bits/stdc++.h>#define ll long long#define ri register int#define MAXN 500...

2020-02-18 23:47:20

Tree,2017 ACM-ICPC 亚洲区(西安赛区)网络赛A,点分治

2017 ACM-ICPC 亚洲区(西安赛区)网络赛 A Treehttps://nanti.jisuanke.com/t/A1267There is a tree with nn nodes, at which attach a binary 64*6464∗64 matrix M_i (1 \le i \le n)Mi​ (1≤i≤n). There are qq queries f...

2020-02-18 21:54:25

Codeforces Round #620 (Div. 2)

Codeforces Round #620 (Div. 2)https://codeforces.com/contest/1304A - Two Rabbits思路:注意特判a+b等于0的情况就好#include<bits/stdc++.h>using namespace std;int x,y,a,b;int main(){ int t; scanf("%d",&...

2020-02-15 23:33:28

Codeforces Round #619 (Div. 2)

Codeforces Round #619 (Div. 2)https://codeforces.com/contest/1301A - Three Strings思路:只要a[i],b[i]中的一个和c[i]相等,直接把另一个和c[i]换就好#include<bits/stdc++.h>#define MAXN 105using namespace std;char a...

2020-02-15 13:34:32

E. Xenon's Attack on the Gangs,Codeforces Round #614 (Div. 2),树形dp

E. Xenon’s Attack on the Gangshttp://codeforces.com/contest/1293/problem/EOn another floor of the A.R.C. Markland-N, the young man Simon “Xenon” Jackson, takes a break after finishing his project ea...

2020-02-14 21:23:28

Educational Codeforces Round 82 (Rated for Div. 2)

Educational Codeforces Round 82 (Rated for Div. 2)https://codeforces.com/contest/1303A - Erasing Zeroes思路:直接看最左边和最右边的1中间有多少个0#include<bits/stdc++.h>using namespace std;int t;char s[105];...

2020-02-13 00:56:43

E - Water Balance,Codeforces Round #618 (Div. 2),单调栈

E - Water Balancehttps://codeforces.com/contest/1300/problem/Eoutputstandard outputThere are n water tanks in a row, i-th of them contains ai liters of water. The tanks are numbered from 1 to n fro...

2020-02-12 01:33:38

Codeforces Round #618 (Div. 2)

Codeforces Round #618 (Div. 2)http://codeforces.com/contest/1300A - Non-zero思路:首先0就加到1,然后如果总和为0的话肯定有正数,将其中任意一个加1就好#include<bits/stdc++.h>#define MAXN 105using namespace std;int t,n,a[MAXN...

2020-02-10 00:42:13

E. Prefix Enlightenment,Codeforces Round #616 (Div. 2),拆点并查集

E. Prefix Enlightenmenthttp://codeforces.com/contest/1291/problem/E题意:有一个01字符串s,长度为n,有k个集合 A1,A2,...AkA_1,A_2,...A_kA1​,A2​,...Ak​ ,他们都是{ 1,2,...,n1,2,...,n1,2,...,n }的子集,选取集合 AiA_iAi​ 能将字符串s中对应下标的字...

2020-02-08 02:22:19

Codeforces Round #617 (Div. 3)

Codeforces Round #617 (Div. 3)A - Array with Odd Sum思路:有奇偶数同时存在YES,只有奇数是n是奇数为YES,否则NO#include<bits/stdc++.h>#define MAXN 2005using namespace std;int n,t;int main(){ scanf("%d",&t);...

2020-02-05 00:53:35

Codeforces Round #616 (Div. 2)

http://codeforces.com/contest/1291/myA - Even But Not Even思路:先把末尾的偶数全部去掉,然后长度不为0的话看剩下的数字和是否为偶数,是的话直接输出,否则找一个奇数删去,注意不要有前导0#include<bits/stdc++.h>using namespace std;int t,n;char s[3005];in...

2020-02-03 01:39:03

E. Permutation Separation,Educational Codeforces Round 81 (Rated for Div. 2),线段树

E. Permutation Separationhttp://codeforces.com/contest/1295/problem/EYou are given a permutation p1,p2,…,pn (an array where each integer from 1 to n appears exactly once). The weight of the i-th ele...

2020-01-30 19:01:44

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。