- 东明张展奕's blog
ABC367 整理
- 2024-8-18 15:05:02 @
ABC367 整理
cnm的ATcoder把我号封了,他个MXY
A:
水, if, else就可以做
判断这个数是否在范围内
code:
#include<bits/stdc++.h>
using namespace std;
int main(void){
double a,b,c;
cin>>a>>b>>c;
c+=0.5;
if(a>b)
{
if(a>c and c>b)
{
cout<<"Yes";
}
else
{
cout<<"No";
}
}
else
{
if(a<c and c<b)
{
cout<<"No";
}
else
{
cout<<"Yes";
}
}
}
B:
考察 cout
的用法
读入完直接cout
#include <bits/stdc++.h>
using namespace std;
int read()
{
int x = 0, w = 1;
char ch = 0;
while (ch < '0' || ch > '9')
{
if (ch == '-') w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
{
x = x * 10 + (ch - '0');
ch = getchar();
}
return x * w;
}
#define endl '\n'
#define TRACE 1
#define tcout TRACE && cout
#define fst ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define int long long
const int P = 998244353;
const int Base = 3221225477;
const int INF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e6 + 10, M = 2e6 + 10;
signed main()
{
double a;
cin >> a;
cout << a;
return 0;
}
C:
搜索。。。。。。。。
我觉的是循环嵌套 + 递归
code:
你猜