fork download
  1. #include <string.h>
  2. #include <stdlib.h>
  3. #include <algorithm>
  4. #include <vector>
  5. #include <iostream>
  6.  
  7. int main()
  8. {
  9. int j1,j2,i;
  10. char d1[11],d2[11];
  11. char *p1;p1=(char*)malloc(sizeof(char)*5);
  12. char *p2;p2=(char*)malloc(sizeof(char)*5);
  13.  
  14. std::vector<int> v1;
  15. std::vector<int> v2;
  16. std::vector<char> result;
  17.  
  18. for(;;){
  19.  
  20. fflush(stdin);
  21. scanf("%d %d",&j1,&j2);
  22. fflush(stdin);
  23.  
  24. if(j1 == 0 && j2 == 0)
  25. {
  26. result.push_back('F');
  27. break;
  28. }
  29.  
  30. scanf("%[^\n]s",d1);
  31. fflush(stdin);
  32. scanf("%[^\n]s",d2);
  33. fflush(stdin);
  34.  
  35.  
  36. p1 = strtok(d1," ");
  37. while(p1 != '\0'){
  38.  
  39. v1.push_back(atoi(p1));
  40. p1 = strtok('\0'," ");
  41. }
  42.  
  43. /*p2 = strtok(d2," ");
  44. while(p2 != '\0'){
  45. v2.push_back(atoi(p2));
  46. p2 = strtok('\0'," ");
  47. }*/
  48.  
  49. /*std::sort(v1.begin(),v1.end());
  50. std::sort(v2.begin(),v2.end());*/
  51.  
  52. if(v1[0] == v1[1])) result.push_back('N');
  53. else result.push_back('Y');
  54.  
  55. }
  56. std::cout <<"\n";
  57. for(i = 0;result[i] != 'F';i++)std::cout<< result[i] <<"\n";
  58. return 0;
  59. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2 3
78 89
45 67 89
0 0
compilation info
prog.cpp: In function 'int main()':
prog.cpp:52: error: expected primary-expression before ')' token
prog.cpp:52: error: expected `;' before ')' token
stdout

Standard output is empty