http://acdream.info/problem?pid=1007 两个 long long 相乘会超long long #include <cstdio> #include <cstring> #include <algorithm> #define ll long long #define maxn 10000 #define mod 10000000007 using namespace std; ll a[maxn]; ll n,k,t; ll fMul(…
// Problem#: 1007// Submission#: 4893204// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/// All Copyright reserved by Informatic La…
ACdream 1214---矩阵连乘 Problem Description You might have noticed that there is the new fashion among rich people to have their yards tiled with black and white tiles, forming a pattern. The company Broken Tiles is well known as the best tiling company…
LCM Challenge Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1077 Description Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I…
A - A Very Easy Triangle Counting Game Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1008 Description Speedcell and Shoutmon love triangles very much.One day,they are playing a game named “T…
Bet Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1066 Description Josnch星球是一个赌博之风盛行的星球. 每个人一出生就有一定数额的钱,之后的所有收入只能由赌博获得(OMG,如果RP不好,输光了所有的钱...) 假设赌博公司的某场赌博有 N 个结果,每个结果能获得的赔率比分别是 a[1],a[2]...a[…
题目链接:http://poj.org/problem?id=1007 本题属于字符串排序问题.思路很简单,把每行的字符串和该行字符串统计出的字母逆序的总和看成一个结构体.最后把全部行按照这个总和从小到大排序即可. #include <iostream> #include <algorithm> using namespace std; struct DNA { ]; int count; } d[]; int cmp(DNA a, DNA b) { return a.count…
Read Phone Number Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1188 Description Do you know how to read the phone numbers in English? Now let me tell you. For example, In China, the phone n…
Sudoku Checker Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1195 Description Sudoku is a popular single player game. The objective is to fill a 9x9 matrix with digits so that each column, e…
Alice and Bob Time Limit:3000MS Memory Limit:128000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1112 Description Here is Alice and Bob again ! Alice and Bob are playing a game. There are several numbers. First, Alice choose…
Quoit Design Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 47104 Accepted Submission(s): 12318 Problem Description Have you ever played quoit in a playground? Quoit is a game in which fla…
题目链接:http://acdream.info/problem?pid=1157 Problem Description 由3钟类型操作:1)D L R(1 <= L <= R <= 1000000000) 增加一条线段[L,R]2)C i (1-base) 删除第i条增加的线段,保证每条插入线段最多插入一次,且这次删除操作一定合法3) Q L R(1 <= L <= R <= 1000000000) 查询目前存在的线段中有多少条线段完全包含[L,R]这个线段,线段X…
题目链接:http://acdream.info/problem?pid=1128 Problem Description wuyiqi陷入了一个迷宫中,这个迷宫是由N*M个格子组成的矩阵.每个格子上堆放了一定数量的箱子.(i,j)表示第i行,第j列的格子.wuyiqi可以将一个格子上的箱子移动到相邻的格子上,或者在这个格子上销毁.也就是在(i,j)的箱子可以移动到(i-1,j).(i+1,j).(i,j-1)和(i,j+1),但是不能移动到矩阵范围外.将(i,j)的格子上的一个箱子移动到相邻格…
http://acdream.info/problem?pid=1093 女神的正多面体 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 128000/64000 KB (Java/Others) SubmitStatistic Next Problem Problem Description EOF女神灰常喜欢整齐的东西,例如多面体中最喜欢的就是正多面体.正多面体的定义为:指每个面都是全等的正多边形的多面体.欧拉大人告诉我们,正多面体只…