标签:blog http io os ar for sp on 2014
水模拟:
#include <stdio.h> #include <string.h> #include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <map> #include <queue> #include <stack> #define PI acos(-1.0) #define M 1000005 //10^6 #define eps 1e-8 #define LL long long #define moo 1000000007 #define INF -999999999 using namespace std; char a[M]; int main() { int T; while(scanf("%d",&T)!=EOF) { int dd=T; while(T--) { scanf("%s",a); int flag=0; cout<<"Case #"<<dd-T<<": "; for(int i=0;i<strlen(a);i++) { if(a[i]==':'&&a[i+1]=='/'&&a[i+2]=='/'&&flag==0) { i=i+3; flag=1; } if(flag==1) { if(a[i]=='/'||a[i]==':') break; printf("%c",a[i]); } } cout<<endl; } } }
标签:blog http io os ar for sp on 2014
原文地址:http://blog.csdn.net/u013712847/article/details/40451105