#1881369

Solution for 1601: Short Phrase by cookies

Source Code Status Test Cases
    Policy: public     Reviewed: 76    
00.00 sec    1204 KB    4 lines     223 bytes    2016-06-26 04:05
#include<iostream>
#define f(X) for(c=0;c<X;c+=v[p++]);if(c-X)goto L;
using namespace std;main(){for(int n,v[50],s,p,c;cin>>n,n;){string t;for(s=0;s<n;)cin>>t,v[++s]=t.size();s=0;L:p=++s;f(5)f(7)f(5)f(7)f(7)cout<<s<<endl;}}

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 2/2 C++ CPU: 00.00 sec Memory: 1204 KB Length: 223 B 2016-06-26 04:05 2016-06-26 04:05
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Accepted 00.00 sec 1204 KB
Case #2: : Accepted 00.00 sec 1204 KB
< prev | / | next >  
 
Judge Input #  ( | ) Judge Output #  ( | )


Comments
 
 Under Construction.
 
Categories
 
 
Free Tags