[题目链接]:http://vj.bit-studio.cn/contest/205664#overview A: [给你一个长度为n的序列,尾部插入再反转,求n次后最终序列][规律/思维] [分析]:STL-deque会超时,只能找规律. [代码]: #include<bits/stdc++.h> using namespace std; ; int a[maxn],ans[maxn]; int n; int main() { scanf("%d",&n); ;i…
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/128000 K (Java/Others)Total Submission(s): 2578 Accepted Submission(s): 713 Problem Description Aliens on planet Pandora also write computer progra…
Ubiquitous Religions Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 23997 Accepted: 11807 Description There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in findi…
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33726 Accepted Submission(s): 13266 Problem Description 很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少.这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就是按照老师的要…
不容易系列之一 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13566 Accepted Submission(s): 5660 Problem Description 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的…
基础数据结构——顺序表(2) Time Limit: 1000 MS Memory Limit: 10240 K Total Submit: 355(143 users) Total Accepted: 158(130 users) Rating: Special Judge: No Description 在长度为n(n<1000)的顺序表中可能存在着一些值相同的“多余”数据元素(类型为整型),编写一个程序将“多余”的数据元素从顺序表中删除,使该表由一个“非纯表”(…
Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8435 Accepted Submission(s): 5248 Problem Description There is a rectangular room, covered with square tiles. Each tile is colore…
Description When Frodo, Sam, Merry, and Pippin are at the Green Dragon Inn drinking ale, they like to play a little game with parchment and pen to decide who buys the next round. The game works as follows: Given an m × n rectangular tile with each sq…
题意: P门课程,N个学生.给出每门课程的选课学生,求是否可以给每门课程选出一个课代表.课代表必须是选了该课的学生且每个学生只能当一门课程的. 题解: 匈牙利算法的入门题. #include <iostream> #include <cstring> #include <cstdio> #include <vector> using namespace std; ; int t; int k, s; int flag; int p, n; int vis[m…