#include <iostream> //1002
#include<set>
#include<stdio.h>
using namespace std;
const int maxn=500000+10;
typedef long long ll;
int a[maxn];
int main()
{
int n,z,l;
ll m;
int t;
scanf("%d",&t);
while(t--)
{
scanf("%d%lld%d%d",&n,&m,&z,&l);
a[1]=0;
for(int i=2;i<=n;i++)
a[i]=(a[i-1]*m+z)%l;
// for(int i=1;i<=n;i++)
// cout<<a[i]<<" ";
ll ans=0;
for(int i=1;i<=n;i++)
ans^=2*a[i];
printf("%lld\n",ans);
}
return 0;
}

#include <iostream>//1005
#include <stdio.h>
using namespace std; int main()
{
int T,a,b;
int s[90]={0,1312,2372,520,932,800,1086,1402,1313,1681,2080,495,737,577,786,1011,999,1251,1520};
s[35]=1139;
s[36]=1350;
s[53]=1008;
s[54]=1170;
s[85]=920;
s[86]=1037;
while(scanf("%d%d",&a,&b)!=EOF)
{ printf(s[a]>s[b]?"FIRST BIGGER\n":"SECOND BIGGER\n");
}
return 0;
}
#include <iostream> //1007
#include<set>
#include<stdio.h>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
multiset<int>que;
multiset<int>::iterator it;
for(int i=1;i<=n;i++)
{
int a;
scanf("%d",&a);
if(a==1)
{
int b;
scanf("%d",&b);
que.insert(b);
}
if(a==2)
{
//int b;
// scanf("%d",&b);
if(!que.empty())
it=que.begin(),que.erase(*it);
}
if(a==3)
{
if(que.empty())
printf("0\n");
else
{
it=que.end();
it--;
printf("%d\n",(*it));
// cout<<*it<<endl;
}
}
}
}
return 0;
}

趁卡题来一发水题题解1002,1007队友写的,三道题都是水题

2015 Multi-University Training Contest 5的更多相关文章

  1. 2015 Multi-University Training Contest 8 hdu 5390 tree

    tree Time Limit: 8000ms Memory Limit: 262144KB This problem will be judged on HDU. Original ID: 5390 ...

  2. 2015 UESTC Winter Training #8【The 2011 Rocky Mountain Regional Contest】

    2015 UESTC Winter Training #8 The 2011 Rocky Mountain Regional Contest Regionals 2011 >> North ...

  3. 2015 UESTC Winter Training #7【2010-2011 Petrozavodsk Winter Training Camp, Saratov State U Contest】

    2015 UESTC Winter Training #7 2010-2011 Petrozavodsk Winter Training Camp, Saratov State U Contest 据 ...

  4. Root(hdu5777+扩展欧几里得+原根)2015 Multi-University Training Contest 7

    Root Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Su ...

  5. 2015 Multi-University Training Contest 6 solutions BY ZJU(部分解题报告)

    官方解题报告:http://bestcoder.hdu.edu.cn/blog/2015-multi-university-training-contest-6-solutions-by-zju/ 表 ...

  6. HDU 5360 Hiking(优先队列)2015 Multi-University Training Contest 6

    Hiking Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total S ...

  7. hdu 5288 OO’s Sequence(2015 Multi-University Training Contest 1)

    OO's Sequence                                                          Time Limit: 4000/2000 MS (Jav ...

  8. HDU5294 Tricks Device(最大流+SPFA) 2015 Multi-University Training Contest 1

    Tricks Device Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) To ...

  9. hdu 5416 CRB and Tree(2015 Multi-University Training Contest 10)

    CRB and Tree                                                             Time Limit: 8000/4000 MS (J ...

  10. 2015多校联合训练赛 hdu 5308 I Wanna Become A 24-Point Master 2015 Multi-University Training Contest 2 构造题

    I Wanna Become A 24-Point Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 ...

随机推荐

  1. sql新增后返回主键

    对于刚学的人来说有点帮助,新增后返回主键有两种方法: 1,返回自增的主键: INSERT INTO 表名 (字段名1,字段名2,字段名3,…) VALUES (值1,值2,值3,…) SELECT @ ...

  2. 转:php使用websocket示例详解

    原文来自于:http://www.jb51.net/article/48019.htm 这篇文章主要介绍了php使用websocket示例,需要的朋友可以参考下   下面我画了一个图演示 client ...

  3. 董的博客 hadoop

    董的博客 https://issues.apache.org/jira/browse/MAPREDUCE 很重要,把MAPREDUCE改为YARN即可 直接下载patch即可 http://horto ...

  4. python 单元测试

    http://blog.csdn.net/five3/article/details/7104466

  5. AlgorithmsI Exercises: Analysis of Algorithms

    Question 1 Suppose that you time a program as a function of N and producethe following table. N seco ...

  6. Pearls DP

    Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 6647   Accepted: 3241 Description In Pe ...

  7. Poetize6: Acting Cute

    3042: Acting Cute Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 59  Solved: 36[Submit][Status] Des ...

  8. 动态规划(状态压缩):BZOJ 2621 [Usaco2012 Mar]Cows in a Skyscraper

      2621: [Usaco2012 Mar]Cows in a Skyscraper Time Limit: 20 Sec  Memory Limit: 128 MBSubmit: 303  Sol ...

  9. 【转】Ansys 13.0 flexlm not running完美解决方案

    http://jingyan.baidu.com/article/af9f5a2dd9843a43150a4550.html 实测,12.1 用此方法问题同样得解.

  10. Java---网络编程(2)-UDP

    UDP ☆ UDP 将数据及源和目的封装成数据包中,不需要建立连接 每个数据报的大小在限制在64k内 因无连接,是不可靠协议 不需要建立连接,速度快 DatagramSocket和DatagramPa ...