A. Ostap and Grasshopper time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output On the way to Rio de Janeiro Ostap kills time playing with a grasshopper he took with him in a special box. Ostap b…
Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14289 Accepted: 5962 Description On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is play…
B. Urbanization time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Local authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the ques…
QS Network Time Limit: 2 Seconds Memory Limit: 65536 KB Sunny Cup 2003 - Preliminary Round April 20th, 12:00 - 17:00 Problem E: QS Network In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with ea…
(一)简单入门 1.创建一个表 create table if not exists ljh_emp( name string, salary float, gender string) comment 'basic information of a employee' row format delimited fields terminated by ','; 2.准备数据文件 创建test目录且目录只有一个文件,文件内容如下: ljh,25000,male jediael,25000,mal…
use sentinel to avoid boudary testing, use swap trick to avoid extra copy. original version #include <cstdio> #include <algorithm> int main() { //freopen("input.txt","r",stdin); const int MAXSIZE=22, dimSize=20; int bacnums…
errors, clauses in place, logical ones, should be avoided. #include <cstdio> #include <cstring> #include <algorithm> int main() { //freopen("input.txt","r",stdin); const int CorNum=201; int ncase, npair, to,from, firs…
Squares Time Limit: 3500MS Memory Limit: 65536K Total Submissions: 17462 Accepted: 6634 Description A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about it…
A. Case of the Zeros and Ones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing…
Crashing Robots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8340 Accepted: 3607 Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destination…
Design T-Shirt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6744 Accepted Submission(s): 3167 Problem Description Soon after he decided to design a T-shirt for our Algorithm Board on Free…
Train Problem I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25029 Accepted Submission(s): 9445 Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays…
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <vector> using namespace std; struct node { int f, s; }; vector<node>imap[40005]; int deep[40005]; int dis[40005]; int fa[40005]; int ff…
#include <iostream> #include<cstring> #include<cstdio> #include<cmath> #include<climits> using namespace std; int g[505][505]; int dx[505],dy[505]; bool vx[505], vy[505]; int dis[505]; int n, x, y; int res, minn; bool find(in…
人生中第一个AC的广搜题目,喵呜,C++的STL果真不错, #include<stdio.h> #include<queue> #include<string.h> #include<windows.h> using namespace std; bool visited[100][100][100]; int a, b, c; struct Node{ int a; int b; int c; int s; }; Node water; Node cup;…