打印答案。 思路:
简简单单,我们只需要设1个变量,输入,判断,输出即可。唯一需要小心的就是最好加上换行。 代码:
[code]#pragma GCC optimize(2)//交洛谷时注释掉#include #define int long long //十年OI一场空,不开long long见祖宗using namespace std;using ll=long long;inline void read(int& a) { int w = 1, c;a = 0; while ((c = getchar()) < '0' || c > '9') if (c == '-') w = -1; do { a=a*10+(c ^48); } while ((c = getchar()) >= '0' && c =200&&ss; string ans=s; for(int i=0;i