Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Mark ( 7 years ago )
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int telepszam;
int napszam;
cin>>telepszam>>napszam;
int tomb[telepszam][napszam];
vector<int> megoldasok;
for(int i=0; i<telepszam; i++){
for(int y=0; y<napszam; y++){
cin>>tomb[i][y];
}
}
for(int i=0; i<telepszam; i++){
for(int y=1; y<napszam; y++){
if(tomb[i][y-1]<=tomb[i][y]-10 || tomb[i][y-1]>=tomb[i][y]+10){
megoldasok.push_back(i+1);
break;
}
}
}
cout<<megoldasok.size()<<" ";
for(int i=0; i<megoldasok.size(); i++){
cout<<megoldasok[i]<<" ";
}
return 0;
}
Revise this Paste