Search found 1 match

by nisuh_w
Thu Sep 03, 2009 10:49 am
Forum: Volume 2 (200-299)
Topic: 231 - Testing the CATCHER
Replies: 53
Views: 24945

Re: WA 231 Testing the catcher

#include<stdio.h>
int data[40000];
int main(){
int cases=1;
while(1){
int n=0;
while(scanf("%d",&data[n++])==1){
if(data[n-1]==-1)break;
}
if(data[0]==-1)break;
n--;
int length[n],maxlen=1;
for(int i=0;i<n;i++)
length[i]=1;
for(int i=0;i<n-1;i++){
for(int j=i+1;j<n;j++){
if(data[j ...

Go to advanced search