Educational Codeforces Round 5(A,B题)
虽然是水题但还是贴下代码把
A
#include<cstring>
#include<cstdio>
using namespace std;
const int qq=1e6+;
char x[qq],y[qq];
int main()
{ int ans=;int a=,b=;
char ch;
while((ch=getchar())!='\n'){
if(ch!='') ans=;
if(ans) x[a++]=ch;
}
ans=;
while((ch=getchar())!='\n'){
if(ch!='') ans=;
if(ans) y[b++]=ch;
}
if(a>b) printf(">\n");
else if(a<b) printf("<\n");
else{
int i;
for(i=;i<a;++i)
if(x[i]>y[i]){
printf(">\n"); break;
}
else if(x[i]<y[i]){
printf("<\n");break;
}
if(i==a) printf("=\n");
}
}
B
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int mmin[];
int main()
{
int n,m,a;
cin >> n >> m; // 就是求每一行最小值中 那个 最大的
int t=;
for(int i=;i<n;++i){
int ans=;
cin >> ans;
for(int j=;j<m;++j){
cin >> a;
if(a<ans) ans=a;
}
mmin[t++]=ans;
}
sort(mmin,mmin+t);
cout << mmin[t-] << endl;
}
Educational Codeforces Round 5(A,B题)的更多相关文章
- Educational Codeforces Round 23 A-F 补题
A Treasure Hunt 注意负数和0的特殊处理.. 水题.. 然而又被Hack了 吗的智障 #include<bits/stdc++.h> using namespace std; ...
- Educational Codeforces Round 12 B C题、
B. Shopping 题意:n个顾客,每个顾客要买m个物品,商场总共有k个物品,看hint就只知道pos(x)怎么算了,对于每一个Aij在k个物品中找到Aij的位置.然后加上这个位置对于的数值,然后 ...
- Educational Codeforces Round 10 A B题、
A. Gabriel and Caterpillar 题意: 就是说 一个小孩子去观察毛毛虫从 h1的地方爬到h2的地方.毛毛虫从10点爬到22点.每小时爬的距离是a, 晚上22点到第二天早上10点 ...
- Educational Codeforces Round 30 A[水题/数组排序]
A. Chores time limit per test 2 seconds memory limit per test 256 megabytes input standard input out ...
- Educational Codeforces Round 5
616A - Comparing Two Long Integers 20171121 直接暴力莽就好了...没什么好说的 #include<stdlib.h> #include&l ...
- Educational Codeforces Round 71 (Rated for Div. 2)-E. XOR Guessing-交互题
Educational Codeforces Round 71 (Rated for Div. 2)-E. XOR Guessing-交互题 [Problem Description] 总共两次询 ...
- Educational Codeforces Round 53 (Rated for Div. 2) (前五题题解)
这场比赛没有打,后来补了一下,第五题数位dp好不容易才搞出来(我太菜啊). 比赛传送门:http://codeforces.com/contest/1073 A. Diverse Substring ...
- Educational Codeforces Round 37
Educational Codeforces Round 37 这场有点炸,题目比较水,但只做了3题QAQ.还是实力不够啊! 写下题解算了--(写的比较粗糙,细节或者bug可以私聊2333) A. W ...
- Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship
Problem Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...
- Educational Codeforces Round 35 (Rated for Div. 2)
Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...
随机推荐
- Statement对象
Statement 对象 创建 Statement 对象 在你准备使用 Statement 对象执行 SQL 语句之前,你需要使用 Connection 对象的 createStatement() 方 ...
- 消息队列rabbitmq rabbitMQ安装
消息队列rabbitmq 12.1 rabbitMQ 1. 你了解的消息队列 生活里的消息队列,如同邮局的邮箱, 如果没邮箱的话, 邮件必须找到邮件那个人,递给他,才玩完成,那这个任务会处理的很麻 ...
- No.5 Verilog 建模方式
5-1 门级建模 VerilogHDL内建基元门: 多输入门:and, nand, or, nor, xor, xnor; 多输出门:buf, not 三态门:bufif0, bufif1, noti ...
- Leetcode914.X of a Kind in a Deck of Cards卡牌分组
给定一副牌,每张牌上都写着一个整数. 此时,你需要选定一个数字 X,使我们可以将整副牌按下述规则分成 1 组或更多组: 每组都有 X 张牌. 组内所有的牌上都写着相同的整数. 仅当你可选的 X > ...
- 本地 vs. 云:大数据厮杀的最终幸存者会是谁?— InfoQ专访阿里云智能通用计算平台负责人关涛
摘要: 本地大数据服务是否进入消失倒计时?云平台大数据服务最终到底会趋向多云.混合云还是单一公有云?集群规模增大,上云成本将难以承受是误区还是事实?InfoQ 将就上述问题对阿里云智能通用计算平台负责 ...
- 【JZOJ4747】【NOIP2016提高A组模拟9.3】被粉碎的线段树
题目描述 输入 第一行包括两个正整数,N ,M ,分别表示线段树的宽以及询问次数. 以下N-1 行以先序遍历(dfs深搜顺序)描述一个小R线段树,每行一个正整数表示当前非叶子节点的 mid,保证每个节 ...
- 二.python数据结构的性能分析
目录: 1.引言 2.列表 3.字典 一.引言 - 现在大家对 大O 算法和不同函数之间的差异有了了解.本节的目标是告诉你 Python 列表和字典操作的 大O 性能.然后我们将做一些基于时间的实验来 ...
- oracle-Expdp/impdp命令
建立逻辑路径 create or replace directory dumpdir as 'c:\'; grant read,write on directory dumpdir to scott; ...
- [idea]Error:java: invalid source release: 1.8 标签: idea 2017-02-24 15:50 961人阅读
最近用idea敲struts,虽然idea的界面很好看,代码提示也很强大,不过也的确是碰到了一些在eclipse上从来没有碰到过的问题,而且我发现,idea的错误,很多都是在外国的网站上提问的人比较多 ...
- vuxdemo1
//main.js import Vue from 'vue' import router from './router' import store from './store' import axi ...