Advertisement
Denistod

Untitled

Nov 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int ap[13];
  4. int main()
  5. {
  6. int k,n,m,i,x,p=1,c=0,j;
  7.  
  8. cin>>k>>n>>m;
  9. for(i=1;i<=n;i++)
  10. {
  11. for(j=1;j<=m;j++)
  12. {
  13. cin>>x;
  14. if(k==x&&ap[j]==0)
  15. {
  16. p=p*j;
  17. c++;
  18. ap[j]=1;
  19. }
  20. }
  21. }
  22. if(c==0)
  23. {
  24. cout<<"NU EXISTA";
  25. }
  26. else
  27. {
  28. cout<<p;
  29. }
  30. return 0;
  31. }
  32.  
  33.  
  34. 82
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement