Problem E: 12306
#include <stdio.h>
struct student{
int n;
int m;};
int main(void)
{
int T;
int k,g,i,j;
struct student s1[],max;
scanf("%d",&T);
while(T!=)
{
scanf("%d",&k);
for(i=;i<k;i++)
scanf("%d%d",&s1[i].n,&s1[i].m);
for(i=;i<k-;i++)
for(j=i+;j<k;j++)
if(s1[i].n>s1[j].n)
{
max=s1[i];
s1[i]=s1[j];
s1[j]=max;
}
for(i=;i<k;i++)
printf("%d\n",s1[i].m);
T--;
}
return ;
}
Problem E: 12306的更多相关文章
- 12306官方火车票Api接口
2017,现在已进入春运期间,真的是一票难求,深有体会.各种购票抢票软件应运而生,也有购买加速包提高抢票几率,可以理解为变相的黄牛.对于技术人员,虽然写一个抢票软件还是比较难的,但是还是简单看看123 ...
- WPF做12306验证码点击效果
一.效果 和12306是一样的,运行一张图上点击多个位置,横线以上和左边框还有有边框位置不允许点击,点击按钮输出坐标集合,也就是12306登陆的时候,需要向后台传递的参数. 二.实现思路 1.获取验证 ...
- 1199 Problem B: 大小关系
求有限集传递闭包的 Floyd Warshall 算法(矩阵实现) 其实就三重循环.zzuoj 1199 题 链接 http://acm.zzu.edu.cn:8000/problem.php?id= ...
- No-args constructor for class X does not exist. Register an InstanceCreator with Gson for this type to fix this problem.
Gson解析JSON字符串时出现了下面的错误: No-args constructor for class X does not exist. Register an InstanceCreator ...
- C - NP-Hard Problem(二分图判定-染色法)
C - NP-Hard Problem Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144 ...
- Time Consume Problem
I joined the NodeJS online Course three weeks ago, but now I'm late about 2 weeks. I pay the codesch ...
- Programming Contest Problem Types
Programming Contest Problem Types Hal Burch conducted an analysis over spring break of 1999 and ...
- hdu1032 Train Problem II (卡特兰数)
题意: 给你一个数n,表示有n辆火车,编号从1到n,入站,问你有多少种出站的可能. (题于文末) 知识点: ps:百度百科的卡特兰数讲的不错,注意看其参考的博客. 卡特兰数(Catalan):前 ...
- BZOJ2301: [HAOI2011]Problem b[莫比乌斯反演 容斥原理]【学习笔记】
2301: [HAOI2011]Problem b Time Limit: 50 Sec Memory Limit: 256 MBSubmit: 4032 Solved: 1817[Submit] ...
随机推荐
- eureka服务端
服务注册与发现——Eureka Eureka Server:服务的注册中心,负责维护注册的服务列表. Service Provider:服务提供方,作为一个Eureka Client,向Eureka ...
- LCD实验学习笔记(六):存储控制器
s3c2440可使用地址空间为1GB(0x00000000到0x40000000). 1G空间分为8个BANK,每个BANK为128MB. 设27条地址线,和8个片选引脚(nGCS0-nGCS7). ...
- python基础===* 解包,格式化输出和print的一点知识
python3中的特性: >>> name = "botoo" >>> print(f"my name is {name}" ...
- gnu app url[web][5星]
http://www.gnu.org/software/software.zh-cn.html http://linux.chinaunix.net/news/2010/12/07/1175310.s ...
- pam会话函数详解
pam会话函数详解 http://www.xuebuyuan.com/2223069.html http://blog.itpub.net/15480802/viewspace-1406088/ ht ...
- Bzoj-2301 [HAOI2011]Problem b 容斥原理,Mobius反演,分块
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2301 题意:多次询问,求有多少对数满足 gcd(x,y)=k, a<=x<=b ...
- Kettle提高输入输出数据总结
1 mysql在数据连接是可以通过设置一下三个三处的方式 useServerPrepStmts=false useCursorFetch=true useCompression= ...
- 全国省市区数据SQL - 省市区
转载:https://www.cnblogs.com/flywind/p/6036801.html
- 【Java基础】一些问题
1. HashSet是如何保证数据不重复的: 首先,HashSet添加元素的时候,底层是通过HashMap的put方法来实现的,而添加的元素,则是保存在了hashMap的key里,因为HashMap的 ...
- 应用程序有bug崩溃重启的案例
1.程序主界面代码 using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;u ...