2018ACM-ICPC南京现场赛D题-Country Meow Problem D. Country Meow Input file: standard input Output file: standard output In the 24th century, there is a country somewhere in the universe, namely Country Meow. Due to advanced technology, people can easily tra…
Alice's Print Service Time Limit: 2 Seconds Memory Limit: 65536 KB Alice is providing print service, while the pricing doesn't seem to be reasonable, so people using her print service found some tricks to save money. For example, the price when…
Collision Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge There's a round medal fixed on an ideal smooth table, Fancy is trying to throw some coins and make them slip towards the medal to collide. There's also a round range which…
杭州现场赛的题.BFS+DFS #include <iostream> #include<cstdio> #include<cstring> #define inf 9999999 using namespace std; char mp[105][105]; int sq[5][5]; int step[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; struct pos { int x,y; }; int n,m,prn,x,y,tmp,ans…
2019ICPC南京网络赛A题 The beautiful values of the palace https://nanti.jisuanke.com/t/41298 Here is a square matrix of n * nn∗n, each lattice has its value (nn must be odd), and the center value is n * nn∗n. Its spiral decline along the center of the squar…
Walk Through Squares Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 200 Accepted Submission(s): 57 Problem Description On the beaming day of 60th anniversary of NJUST, as a military colleg…
Divide Groups Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 423 Accepted Submission(s): 161 Problem Description This year is the 60th anniversary of NJUST, and to make the celebration mor…
Count The Pairs Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 277 Accepted Submission(s): 150 Problem Description With the 60th anniversary celebration of Nanjing University of Science…
现场赛大佬打印的代码,观摩了一哈. 写了注释,贴一下,好好学习.%%%PKU 代码: //树上差分(LCA) #include<bits/stdc++.h> #define For(i,x,y) for (int i=x;i<y;i++) #define fi first #define se second #define pb push_back #define mp make_pair #define lf else if #define dprintf(...) fprintf(s…
题目链接:acm.hdu.edu.cn/showproblem.php?pid=5538 House Building Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 621 Accepted Submission(s): 398 Problem Description Have you ever played the vid…