标签:search algorithm 期末考试 bottom rip ref mod ssi sample
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8761 Accepted Submission(s): 5228
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <queue> #include <vector> #include <iomanip> #include <math.h> #include <map> using namespace std; #define FIN freopen("input.txt","r",stdin); #define FOUT freopen("output.txt","w",stdout); #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 typedef long long LL; typedef pair<int, int> PII; using namespace std; int main() { //FIN int a, b; while(~scanf("%d%d", &a, &b)) { if(a % (b + 1) != 0) { int tmp = a / (b + 1); if(tmp > 0) { printf("%d\n", a % (b + 1)); continue; } for(int i = a ; i <= b; i++) { if(i == a) printf("%d", i); else printf(" %d", i); } printf("\n"); } else printf("none\n"); } return 0; }
标签:search algorithm 期末考试 bottom rip ref mod ssi sample
原文地址:http://www.cnblogs.com/Hyouka/p/7425362.html