What does ... mean when reading input? From test cases
Difference between en2 and en3, changed 49 character(s)
Here is the test case:[submission:99822971]↵


[submission:99822971]↵
#include <iostream>↵

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;↵
}↵

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English wick3d 2020-11-29 02:01:06 49 Tiny change: '[submissio' -> 'Here is the test case:[submission:99822971]\n\n\n[submissio'
en2 English wick3d 2020-11-29 01:59:21 23 Tiny change: '#include <' -> '[submission:99822971]\n#include <'
en1 English wick3d 2020-11-29 01:58:23 673 Sorry,for the bad image. submission#99822971.What does 1.. mean? when reading input. First case it come Ok,other case not OK. (published)