fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. typedef char Ten[30];
  5. Ten a[1000000];
  6. int b[1000000];
  7. int n;
  8. void In() {
  9. fflush(stdin);
  10. for (int i = 1; i <= n; ++i)
  11. cin.getline(a[i], sizeof(a[i]));
  12. for(int i = 1 ; i <= n; ++i)
  13. cout << i << " " << a[i] << endl;
  14. }
  15. int main(){
  16. cin >> n;
  17. In();
  18. return 0;
  19. }
Success #stdin #stdout 0s 4364KB
stdin
4
Leo
Leo
Leo
Leo
Leo
stdout
1 
2 Leo
3 Leo
4 Leo