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& ...
随机推荐
- 你真的了解HTML吗
有这么一段HTML,请挑毛病: <P> 哥写的不是HTML,是寂寞.<br><br> 我说: <br>不要迷恋哥,哥只是一个传说 这是原来雅虎一道笔试题 ...
- DX9纹理半像素偏移-Directly Mapping Texels to Pixels
原文:DX9纹理半像素偏移-Directly Mapping Texels to Pixels 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u01 ...
- openssl生成SSL证书的流程 - moonhillcity的博客 - CSDN博客
1.安装openssl 之后在/usr/lib/ssl目录下(ubuntu系统,用whereis查下ssl目录即可)下找到openssl.cnf,拷贝到工作目录下. 2.工作目录下新建demoCA文件 ...
- openssl生成证书 - CSDN博客
大家都可以生成公钥.私钥对,无法确认公钥对到底是谁的. 如果能够确定公钥到底是谁的,就不会有这个问题了.例如,如果收到“黑客”冒充“服务器”发过来的公钥,经过某种检查,如果能够发现这个公钥不是“服务器 ...
- PHP核心编程--目录操作(包含文件操作)
一.目录操作 1. 创建目录 创建目录mkdir(目录名称) //返回值为布尔 一次性创建主目录及其子目录 判断是不是一个目录is_dir //返回true,false 判断目录或文件是否存 ...
- Haskell 学习
truncate pi -- 表示截断, 此处结果为 3 haskell中的touple是可变的,而python中是不可变的 lines函数: lines :: String -> [Strin ...
- 【JZOJ3886】【长郡NOIP2014模拟10.22】道路维护
CCC 最近徆多人投诉说C国的道路破损程度太大,以至亍无法通行 C国的政府徆重视这件事,但是最近财政有点紧,丌可能将所有的道路都进行维护,所以他们决定按照下述方案进行维护 将C国抽象成一个无向图,定义 ...
- LeetCode208 Implement Trie (Prefix Tree). LeetCode211 Add and Search Word - Data structure design
字典树(Trie树相关) 208. Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith ...
- this的作用
1.在一般函数方法中使用 this 指代全局 function test(){ this.x = 1; alert(this.x); } test(); // 1 2.作为对象方法调用,this ...
- 文字内容展开与折叠jquery代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...