小 (→摘要: 难度) |
小 (→摘要: 错误原因) |
||
| 第1行: | 第1行: | ||
[[分类:整数处理]] | [[分类:整数处理]] | ||
==摘要== | ==摘要== | ||
| − | {{信息题|Data Recovery|http://acm.hust.edu.cn/vjudge/contest/view.action?cid{{=}}70594#problem/I|1|100 | + | {{信息题|Data Recovery|http://acm.hust.edu.cn/vjudge/contest/view.action?cid{{=}}70594#problem/I|1|100|time=2015-02-24 13:23:19}} |
*来自寒假练习:[http://acm.hust.edu.cn/vjudge/contest/view.action?cid=70594 2015 Winter Day 1 div1] I题 | *来自寒假练习:[http://acm.hust.edu.cn/vjudge/contest/view.action?cid=70594 2015 Winter Day 1 div1] I题 | ||
*原题链接:http://codeforces.com/problemset/problem/413/A | *原题链接:http://codeforces.com/problemset/problem/413/A | ||
| 题目链接 | 难度等级 | 完成状态 | 完成分数 | 最后编辑时间 | 需要注意 |
|---|---|---|---|---|---|
| Data Recovery | ★☆☆☆☆ | 答案正确 | 100 | 2015-02-24 13:23:19 | 无 |
有n个温度,记录了m个温度和温度最大最小值,判断数据是否有误。
直接判断即可。
| 413A.cpp代码已折叠
展开折叠内容
|
|---|
#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
using namespace std;
#define dsi(n) int n;scanf("%d",&n)
#define si(n) scanf("%d",&n)
#define f(i,n) for(int i=1;i<=n;++i)
#define fi(n) f(i,n)
#define f0(i,n) for(int i=0;i!=n;++i)
#define fd(i,n) for(int i=n;i>=1;--i)
#define ci const int&
#define foreach(i,s) for(typeof(s.begin()) i=s.begin();i!=s.end();++i)
#define c(x) const x&
class st
{
int x,y;
friend bool operator <(const st&a,const st&b){return a.x<b.x;}
};
int a[1000][1000]={},used[1000]={},ans[1000]={},deadM[1000]={},deadC[1000]={};
int main()
{
dsi(n);
dsi(m);
dsi(tmin);
dsi(tmax);
if(n==1&&tmin!=tmax)
{
cout<<"Incorrect";
return 0;
}
bool havetmin=0,havetmax=0;
f(i,m)
{
dsi(t);
if(t==tmin)havetmin=1;
if(t==tmax)havetmax=1;
if(t>tmax||t<tmin)
{
cout<<"Incorrect";
return 0;
}
}
if((n==m&&havetmin&&havetmax)||(n-1==m&&(havetmin||havetmax))||m<=n-2)
{
cout<<"Correct";
return 0;
}
else
{
cout<<"Incorrect";
return 0;
}
return 0;
}
|