HDU 5392 Infoplane in Tina Town】的更多相关文章

Infoplane in Tina Town Time Limit: 14000/7000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 805    Accepted Submission(s): 168 Problem Description There is a big stone with smooth surface in Tina Town. When peop…
Problem Description There is a big stone with smooth surface in Tina Town. When people go towards it, the stone surface will be lighted and show its usage. This stone was a legacy and also the center of Tina Town’s calculation and control system. als…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5392 #include<stdio.h> #include<cstring> #include<cmath> #include<algorithm> #include<set> using namespace std; *1e6+; ; int n, T; int a[MAXN]; int vis[MAXN]; int num[MAXN]; int…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Infoplane in Tina Town Time Limit: 14000/7000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 518    Accepted Submission(s): 74 Problem Description There i…
题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5391 bc:  http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=616&pid=1001 Zball in Tina Town  Accepts: 356  Submissions: 2463  Time Limit: 3000/1500 MS (Java/Others)  Memory Limit:…
问题描述 Tina Town 是一个善良友好的地方,这里的每一个人都互相关心. Tina有一个球,它的名字叫zball.zball很神奇,它会每天变大.在第一天的时候,它会变大11倍.在第二天的时候,它会变大22倍.在第nn天的时候,它会变大nn倍. zball原来的体积是11.Tina想知道,zball在第n-1n−1天时的体积对nn取模是多大呢? Tina是一个蠢蠢的女孩子,当然不会算啦,所以她请你帮她算出这个答案呢. 输入描述 第一行一个正整数TT,表示数据组数 接下来TT行,每行一个正整…
<题目链接> Zball in Tina Town Problem Description Tina Town is a friendly place. People there care about each other.Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes 1 time as large as its original siz…
Zball in Tina Town Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Problem Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows lar…
题目链接 \(Description\) 给定一棵\(Trie\).求\(Trie\)上所有回文串 长度乘以出现次数 的和.这里的回文串只能是从上到下的一条链. 节点数\(n\leq 2\times 10^6\),字符集为a,b,c,d. \(Solution\) 如果不是树,就是回文树模板.对于树,DFS \(x\)的每个儿子的时候都用在\(x\)处的\(las\)即可,也就是按深度存一个\(las\)数组,每次用\(las[dep-1]\)做\(las\)去插入即可.(也可以回溯的时候直接删…
题意: Tina有一个球,它的名字叫zball.zball很神奇,它会每天变大.在第一天的时候,它会变大1倍.在第二天的时候,它会变大2倍.在第n天的时候,它会变大n倍.zball原来的体积是1.Tina想知道,zball在第n−1天时的体积对n取模是多大呢? 思路: 如果n是一个合数,那它肯定是有因子的,即有两个比它小的数字a和b,使得a*b=n,那么答案必为0.如果是质数,打表可知是n-1.数字小的直接算,防止意外.数字都不会超过int. #include <cstdio> #includ…