洛谷2019 3月月赛 T1

题干

洛谷2019 3月月赛 T1

2019第一次月赛 我只有255pts T1还是比较水的。。。 海星 T1一道简单的模拟(就是有坑。。导致很多人不能一次性AC 比如说我

_3个坑点

1.位数问题

洛谷2019 3月月赛 T1

2.-0

洛谷2019 3月月赛 T1

3.0...

洛谷2019 3月月赛 T1

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL read () { LL res = ;int f () ;char ch = getchar ();
while (!isdigit(ch)) { if (ch == '-') f = - ;ch = getchar();}
while (isdigit(ch)) res = (res << ) + (res << ) + (ch ^ ) ,ch = getchar(); return res * f ;
}
LL l,r,t;
inline void print(__int128 x) {
if(x<) putchar('-'),x*=-;
if(x>) print(x/); putchar(x%+);
}
inline bool pd(string s) { __int128 x=; register int f=,tot=-; register char ch=;
while(!isdigit(ch))f|=(ch=='-'),ch=s[++tot];
while(tot<=s.length() and isdigit(ch)) {
x=(x<<)+(x<<)+(ch^); if(f) { if(x*->r or x*-<l) return true;
} else if(x>r or x<l) return true;
ch=s[++tot];
}
return false;
}
signed main() {
l=read(),r=read(),t=read();
while(t--) {
string s; getline(cin,s);
bool flag1=,flag2=;
if(s=="-") flag1=;
if(s[]=='-' and s[]=='') flag1=;
if(s[]=='' and s.length()>) flag1=;
if(flag1) { puts(""); continue; } flag2=pd(s);
if(flag2) { puts(""); continue; }
puts("");
}
return ;
}
上一篇:2019级第一次月赛暨ACM工作室第一次招新赛、补题赛


下一篇:WPF 用 DataTemplate 合并DataGrid列表列头<类似报表设计>及行头列头样式 - 学习