Advertisement
Guest User

Important Wires 20.08.13

a guest
Aug 20th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <ctype.h>
  6. #include <bitset>
  7. #include <iostream>
  8. #include <stack>
  9. #include <queue>
  10. #include <set>
  11. #include <map>
  12. #include <string>
  13. #include <algorithm>
  14. using namespace std;
  15.  
  16. int n;
  17.  
  18. char buf[100010];
  19. char buf2[100010];
  20.  
  21. int main() {
  22.     freopen("important.in", "r", stdin);
  23.     freopen("important.out", "w", stdout);
  24.    
  25.     int n;
  26.     scanf("%d\n", &n);
  27.     cout << "Yes" << endl;
  28.     for(int i = 0; i < n; ++i) {
  29.         gets(buf);
  30.         char a;
  31.         sscanf(buf, " %s", &buf2);
  32.         a = buf2[0];
  33.         if (i) cout << " | " << a;
  34.         else cout << (char)a << " | ~" << (char)a;
  35.     }
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement