wick3d's blog

By wick3d, history, 7 weeks ago, In English

Here is the test case:99822971

99822971

include

using namespace std; struct team{ int p1,p2,p3; }; //there are 3 people int main() { int n,sum=0,problems=0; //input the number of problems cin>>n;

if(n>=1 && n<=100){
struct team *p=nullptr;
//create an array of n problems
p=new team[n];
for(int i=0;i<n;i++){
    cin>>p[i].p1;
    cin>>p[i].p2;
    cin>>p[i].p3;
}
for(int i=0;i<n;i++){
    sum=p[i].p1+p[i].p2+p[i].p3;
    if(sum>=2)
        {
            problems++;
        }
}
cout<<problems;
free(p);

} return 0; }

 
 
 
 
  • Vote: I like it
  • -15
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by wick3d (previous revision, new revision, compare).

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by wick3d (previous revision, new revision, compare).

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Boy

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

It means there are more lines that are not shown.