标签:pos print top 限制 off 规则 accept 题目10 解决
#include<stdio.h> #include<string.h> char s[1001]; int main() { int num1,num2,num3; char *p; while(scanf("%s",s)!=EOF) { num1 = num2 = num3 = 0; p = s; if( !strcmp("zoj",s) ) { printf("Accepted\n"); continue; } while( (*p)=='o' ) { num1++; p++; } if((*p) == 'z'){ p++; while((*p) == 'o'){num2++; p++;} if((*p) == 'j') { p++; while((*p) == 'o') {num3++; p++;} if(!(*p) && num2>0 && num3==num1*num2) {printf("Accepted\n");continue;} } } printf("Wrong Answer\n"); } return 0; } /************************************************************** Problem: 1006 User: kirchhoff Language: C Result: Accepted Time:30 ms Memory:916 kb ****************************************************************/
标签:pos print top 限制 off 规则 accept 题目10 解决
原文地址:http://www.cnblogs.com/gccbuaa/p/7347901.html