Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <algorithm>
  4. #include <fstream>
  5. using namespace std;
  6.  
  7. int wyn=0;
  8. string slo;
  9. ifstream otw;
  10. char tab[10007];
  11.  
  12. int main()
  13. {
  14.     for (int i=1; i<=100; i++)
  15.     {
  16.         printf("%d", i);
  17.         printf("%c\n", '%');
  18.         system("naj.exe < smi01.in > out.out");
  19.         otw.open("out.out");
  20.         otw >> slo;
  21.         otw.close();
  22.         for (int j=0; j<=2000; j++)
  23.         tab[j]=0;
  24.         tab[0]='m';
  25.         tab[1]='d';
  26.         tab[2]='5';
  27.         tab[3]='.';
  28.         tab[4]='e';
  29.         tab[5]='x';
  30.         tab[6]='e';
  31.         tab[7]=' ';
  32.         for (int j=0; j<slo.size(); j++)
  33.         {
  34.             tab[8+j]=slo[j];
  35.         }
  36.         tab[8+slo.size()]=' ';
  37.         tab[9+slo.size()]='>';
  38.         tab[10+slo.size()]=' ';
  39.         tab[2+9+slo.size()]='o';
  40.         tab[2+10+slo.size()]='u';
  41.         tab[2+11+slo.size()]='t';
  42.         tab[2+12+slo.size()]='1';
  43.         tab[2+13+slo.size()]='.';
  44.         tab[2+14+slo.size()]='o';
  45.         tab[2+15+slo.size()]='u';
  46.         tab[2+16+slo.size()]='t';
  47.         system(tab);
  48.         if (system("licz.exe < out1.out")>=wyn)
  49.         {
  50.             wyn=system("licz.exe < out1.out");
  51.             system("prze.exe < out.out > smi01.out");
  52.         }
  53.     }
  54.     printf("GOTOWE\n\n");
  55.     return 0;
  56. }
  57.  
  58. #include <iostream>
  59. #include <cstdio>
  60. #include <algorithm>
  61. using namespace std;
  62.  
  63. char tab[10007];
  64. string slo;
  65. int wyn;
  66.  
  67. int main()
  68. {
  69.     for (char i='a'; i<='z'; i++)
  70.     {
  71.         for (char j='a'; j<='z'; j++)
  72.         {  
  73.             printf("%c%c\n", i, j);
  74.             for (int k=0; k<=25; k++)
  75.             tab[j]=0;
  76.             tab[0]='m';
  77.             tab[1]='d';
  78.             tab[2]='5';
  79.             tab[3]='.';
  80.             tab[4]='e';
  81.             tab[5]='x';
  82.             tab[6]='e';
  83.             tab[7]=' ';
  84.            
  85.             tab[8]=i;
  86.             tab[9]=j;
  87.            
  88.             tab[10]=' ';
  89.             tab[11]='>';
  90.             tab[12]=' ';
  91.             tab[13]='o';
  92.             tab[14]='u';
  93.             tab[15]='t';
  94.             tab[16]='1';
  95.             tab[17]='.';
  96.             tab[18]='o';
  97.             tab[19]='u';
  98.             tab[20]='t';
  99.             system(tab);
  100.             if (system("licz.exe < out1.out")>=wyn)
  101.             {
  102.                 wyn=system("licz.exe < out1.out");
  103.                 slo=i+j;
  104.                 printf("%d %c%c\n", wyn, i, j);
  105.                 system("prze.exe < out1.out > smi02.out");
  106.             }
  107.         }
  108.     }
  109.     return 0;
  110. }
  111.  
  112. #include <iostream>
  113. #include <cstdio>
  114. #include <algorithm>
  115. #include <ctime>
  116. using namespace std;
  117.  
  118. int n;
  119.  
  120. int main()
  121. {
  122.     srand(time(0)^n);
  123.     scanf("%d", &n);
  124.     for (int i=1; i<=n; i++)
  125.     printf("%c", (rand()%26)+'a');
  126.     return 0;
  127. }
  128.  
  129. #include <iostream>
  130. #include <cstdio>
  131. #include <algorithm>
  132. using namespace std;
  133.  
  134. int wyn;
  135. string slo;
  136.  
  137. int main()
  138. {
  139.     cin >> slo;
  140.     for (int i=0; i<slo.size(); i++)
  141.     {
  142.         if (slo[i]<='9')
  143.         wyn+=slo[i]-'0';
  144.         else
  145.         wyn+=slo[i]-'a'+10;
  146.     }
  147.     return wyn;
  148. }
  149.  
  150. #include <iostream>
  151. #include <cstdio>
  152. #include <algorithm>
  153. using namespace std;
  154.  
  155. string slo;
  156.  
  157. int main()
  158. {
  159.     cin >> slo;
  160.     cout << slo;
  161.     return 0;
  162. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement