SHARE
TWEET

Untitled

a guest Feb 19th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from os import popen
  2. from random import randint
  3.  
  4. def gen():
  5.     test = ""
  6.  
  7.     return test
  8.  
  9. cnt = int(1e5)
  10. f1 = open("test.in", "w")
  11. for i in range(1, cnt):
  12.     f = open("TASK.in", "w")
  13.     test = gen()
  14.     f.write(test)
  15.     f.close()
  16.     if i % 100 == 0:
  17.         print(i)
  18.     v1 = popen("run.exe < TASK.in").read()
  19.     v2 = popen("stupid.exe < TASK.in").read()
  20.     if v1 != v2 and v1 + '\n' != v2 and v1 != v2 + '\n':
  21.         f1.write(test)
  22.         break
  23. f1.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top