传送门 Description Using at most 7 matchsticks, you can draw any of the 10 digits as in the following picture: The picture shows how many sticks you need to draw each of the digits. Zaytoonah has a number that consists of N digits. She wants to move som…
传送门 Description Hasan and Bahosain want to buy a new video game, they want to share the expenses. Hasan has a set of N coins and Bahosain has a set of M coins. The video game costs W JDs. Find the number of ways in which they can pay exactly W JDs su…
A - Coins Time Limit:3000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description standard input/output Hasan and Bahosain want to buy a new video game, they want to share the expenses. Hasan has a set of N coins and Bahosain has a…
Rectangles time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output Given an R×C grid with each cell containing an integer, find the number of subrectangles in this grid that contain only one disti…
Solved A Gym 100712A Who Is The Winner Solved B Gym 100712B Rock-Paper-Scissors Solved C Gym 100712C Street Lamps Solved D Gym 100712D Alternating Strings Solved E Gym 100712E Epic Professor Solved F Gym 100712F Travelling Salesman Solved G Gym 10071…
题目链接 https://vjudge.net/contest/240074#overview 只写一下自己做的几个题吧 /* D n^2的暴力dp怎么搞都可以的 这里先预处理 i到j的串时候合法 转移的时候枚举上一个状态 O1判断 */ #include<cstdio> #include<cstring> #include<iostream> #define maxn 1010 using namespace std; int T,n,m,f[maxn],g[maxn…
[题目链接] A - Who Is The Winner 模拟. #include <bits/stdc++.h> using namespace std; int T; int n; struct X { string name; int num; int ti; }s[10010]; bool cmp(X&a,X&b){ if(a.num != b.num) return a.num > b.num; return a.ti < b.ti; } int main…
[题目链接] A - Watching TV 模拟.统计一下哪个数字最多即可. #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int T, n; char s[maxn]; int a[maxn]; int main() { scanf("%d", &T); while(T --) { scanf("%d", &n); memset(a,…
A - Watching TV /* 题意:求出出现次数最多的数字 */ #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int T,n,a[100010]; char s[110]; int main(){ scanf("%d",&T); while(T--){ memset(a, 0, sizeof(a)); scanf(&quo…
非常水的手速赛,大部分题都是没有算法的.巨慢手速,老年思维.2个小时的时候看了下榜,和正常人差了3题(,最后还没写完跑去吃饭了.. A 水 Sort 比大小 /** @Date : 2017-09-01 12:32:08 * @FileName: A.cpp * @Platform: Windows * @Author : Lweleth (SoungEarlf@gmail.com) * @Link : https://github.com/ * @Version : $Id$ */ #incl…