Matrix operation Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 907    Accepted Submission(s): 384 Problem Description M_0 is interested in cryptography. Recently he learned the Advanced Encryp…
题目描述:输入一个偶数,判断这个偶数可以由哪两个差值最小的素数相加,输出这两个素数. 题目分析:模拟题,注意的是为了提高效率,在逐个进行判断时,只要从2判断到n/2就可以了,并且最好用打表法判断素数.代码附上... #include<cstdio> #include<cstring> #include<cmath> ; bool prim[MAX]; void dabiao() { //先打素数表 memset(prim,,sizeof(prim)); ;i<=M…
解题报告: 题目描述:写一个程序给一个编程考试C++实时提交系统排名,给你的数据是题目的总数,每次错误提交罚的时间分,每位用户的姓名,然后是输入用户每题的完成情况,有一下几种情况,第一,输入只有一个正值,表示该题只有一次提价记录,且已经AC了,第二,有一个正值,并且,正值后面有一个括号,括号里面有一个数字,前面的正值表示AC该题所用的时间,后面括号里面的数表示总共有多少次错误的提交记录,第三,只有一个负数,表示该题提交了这个负数的绝对值次,但还没有AC,第四,只有一个0,表示该题没有提交记录,对…
解题报告:水题,直接附上代码,只是觉得这题的作者是不是吃饱了饭撑的,反素数的概念跟这题一点关系都没有. #include<cstdio> int judge1(int k) { ; ;i<=k;++i) if(!(k%i)) tot++; return tot; } int main( ) { int n,a,b; scanf("%d",&n); while(n--) { scanf("%d%d",&a,&b); int M…
解题报告:这题我觉得题目有一个没有交代清楚的地方就是关于横线的字符的宽度的问题,题目并没有说,事实上题目要求的是在保证下面的圈高度不小于上面的圈的高度的情况下,横线的宽度就是等于下面的圈的高度. #include<cstdio> void outplay1(char d,int kuan,int n) { while(kuan--) printf(" "); while(n--) printf("%c",d); puts(""); }…
人工模拟.. #include<stdio.h> #include<iostream> #include<algorithm> #include<vector> #include<cmath> #include<queue> #include<set> #include<map> using namespace std; #define N 10100 #define inf 1000000010 map<…
小Q系列故事——世界上最遥远的距离 Time Limit: 500/200 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1314    Accepted Submission(s): 463 Problem Description 世界上最遥远的距离 不是生与死 而是我就站在你面前 你却不知道我爱你 世界上最遥远的距离 不是我就站在你面前你却不知道我爱你 而是明明知道彼此相爱…
解题报告:就是输入两个用逗号隔开的数字,求出这两个数字的和,并且用正常的方式输出来.直接写一个函数将一个包含逗号的数字转换成十进制的数返回就行了.这里推荐一个函数atoi(),参数是char*型的,然后返回的是一个int型的数,可以很方便的把字符串转化成整形数,包含的头文件是#include<stdlib.h> ,C++里面就是#include<cstdlib> #include<cstdio> #include<cstring> #include<c…
HDU 4041 Eliminate Witches! (模拟题 ACM ICPC 2011 亚洲北京赛区网络赛题目) Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 863    Accepted Submission(s): 342 Problem Description Kaname Mado…
题意: 有两只兔子,一只在左上角,一只在右上角,两只兔子有自己的移动速度(每小时),和初始移动方向. 现在有3种可能让他们转向:撞墙:移动过程中撞墙,掉头走未完成的路. 相碰: 两只兔子在K点整(即处理完一小时走的路后),在同一点,兔子A和兔子B的方向互相交换一下. 向左转 : 两只兔子有自己的转向时间T,每隔T小时,它就会向左转, 但是相碰的优先级高于它,相碰之后就不处理左转问题了. 写模拟题还是很有趣的......练练手 #include <iostream> #include <a…
Problem Description In a military parade, the King sees lots of new things, including an Andriod Phone. He becomes interested in the pattern lock screen. The pattern × square lattice, the three points ,,, the three points ,,, and the three points ,,.…
Children's Day Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 648    Accepted Submission(s): 422 Problem Description Today is Children's Day. Some children ask you to output a big letter 'N'. '…
题目 模拟题也各种wa,我最近真的堕落了,,,,,智商越来越为负数了!!!!!!!! #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ][]; ;//0shang,1xia,2zuo,3you int x,y;//weizhi int weizhi(int i,int j) { ;;} ;;} ;;} ;;} ; } void fangxiang() { )mp[…
Instruction Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 347    Accepted Submission(s): 101 Problem Description Nowadays, Jim Green has produced a kind of computer called JG. In his computer…
 Heap Operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following o…
原题链接 题意:有各种操作,模拟这个程序并输出每次操作的信息 分析:恶心模拟题...用个map记录一下各个等级女孩的谈话数,同时也便于查找权值为u的在不在队列里.因为n很小,其他就暴力模拟了. #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<map> #define ll long long #define ull unsign…
B. Memory Manager 题目连接: http://www.codeforces.com/contest/7/problem/B Description There is little time left before the release of the first national operating system BerlOS. Some of its components are not finished yet - the memory manager is among th…
18002 Z-Scan 时间限制:1000MS  内存限制:65535K提交次数:0 通过次数:0 题型: 编程题   语言: 不限定 Description Z-Scan is a method to scan data in a square matrix(矩阵). Fig.1 shows Z-Scan. Here, the number stands for the scan sequence number of the element. Our question is very sim…
HDU 2686 Matrix 题目链接 3376 Matrix Again 题目链接 题意:这两题是一样的,仅仅是数据范围不一样,都是一个矩阵,从左上角走到右下角在从右下角走到左上角能得到最大价值 思路:拆点.建图,然后跑费用流就可以,只是HDU3376这题,极限情况是300W条边,然后卡时间过了2333 代码: #include <cstdio> #include <cstring> #include <vector> #include <queue>…
Maya Calendar Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 64795   Accepted: 19978 Description During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, profes…
Crossword Answers Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 869   Accepted: 405 Description A crossword puzzle consists of a rectangular grid of black and white squares and two lists of definitions (or descriptions). One list of de…
Prison Transfer Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Submit Status Description The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of t…
The Android University ACM Team Selection Contest Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Now it's 20000 A.D., and the androids also participate in the ACM Inter-national Collegiate Programming Contest (ACM/ICPC). In order to sele…
题目名称 正确答案  序列问题 长途旅行 英文名称 answer sequence travel 输入文件名 answer.in sequence.in travel.in 输出文件名 answer.out sequence.out travel.out 时间限制 1s 1s 1s 空间限制   256M 256M 256M 测试点数目 20 20 10 测试点分值 5 5 10 是否有部分分 无 无 无 题目类型 传统 传统 传统 是否有 SPJ 无 无 无 正确答案 全国信息学奥林匹克联赛(…
Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2223 Descriptionww.co For a dance to be proper in the Altered Culture of Machinema, it must abide by the following rules: A dip…
点球大战(penalty) Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/25 Description 在足球比赛中,有不少赛事,例如世界杯淘汰赛和欧洲冠军联赛淘汰赛中,当比赛双方经过正规比赛和加时赛之后仍然不分胜负时,需要进行点球大战来决定谁能够获得最终的胜利.点球大战的规则非常简单,两方轮流派出球员罚点球,每方各罚5个.当5轮点球结束以后如果仍然不分胜负,则进入一轮定胜…
A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/problem/A Description You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and ';' (semicolon…
A - The First Day at SchoolTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87157#problem/A Description Vasya is a young and very promising android. Today is his first day at University. Vasya has ver…
Instant Complexity Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 2017   Accepted: 698 Description Analyzing the run-time complexity of algorithms is an important tool for designing efficient programs that solve a problem. An algorithm…
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1312 1312: 榜单 Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 222  Solved: 84 [Submit][Status][Web Board] Description ZZY很喜欢流行音乐,每周都要跟踪世界各地各种榜单,例如Oricon和Billboard,现在给出每周各个单曲的销量请给出每周的TOP5以及TOP5中各个单曲的浮动情…