Search found 1 match

by xm_dune
Sat Jul 19, 2003 8:38 am
Forum: Volume 6 (600-699)
Topic: 665 - False coin
Replies: 15
Views: 7818

665 - False coin

#include<iostream.h> #include<math.h> struct{ int present; int weight; int exclude; }a[1005]; int b[1005]; void process(int num){ char op; for(int i=0;i<num*2;i++){ cin>>b ; a[b ].present=1; } cin>>op; switch(op){ case '>': for(i=0;i<num;i++) if(!a[b ].exclude) a[b ].weight+=1; for(;i<num*2;i++) if(...

Go to advanced search