Skip to main content
Commonmark migration
Source Link

Tit-for-tat

9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM=

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= SimilarSimilar to Wrathful, with a few (hopefully) performance-enhancing changes.

import sys
import re

line1 = [int(i) for i in sys.stdin.readline().split()]

players = line1[0]
pid = line1[1]
rounds = line1[2]

lines = []

if rounds == 0:
    print
elif rounds == 25 * players - 1:
    for i in range(players):
        if i+1 != pid:
            print i+1,
    print
else:
    for i in range(rounds):
        lines.append(sys.stdin.readline())
    lastline = lines[-1]
    takes = re.findall(r'\([0-9]+, [0-9]+\)', lastline)
    for take in takes:
        sides = [int(i) for i in re.findall(r'[0-9]+', take)]
        if sides[1] == pid:
            print sides[0],
    print

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

import sys
import re

line1 = [int(i) for i in sys.stdin.readline().split()]

players = line1[0]
pid = line1[1]
rounds = line1[2]

lines = []

if rounds == 0:
    print
elif rounds == 25 * players - 1:
    for i in range(players):
        if i+1 != pid:
            print i+1,
    print
else:
    for i in range(rounds):
        lines.append(sys.stdin.readline())
    lastline = lines[-1]
    takes = re.findall(r'\([0-9]+, [0-9]+\)', lastline)
    for take in takes:
        sides = [int(i) for i in re.findall(r'[0-9]+', take)]
        if sides[1] == pid:
            print sides[0],
    print

Tit-for-tat

9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM=

Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

import sys
import re

line1 = [int(i) for i in sys.stdin.readline().split()]

players = line1[0]
pid = line1[1]
rounds = line1[2]

lines = []

if rounds == 0:
    print
elif rounds == 25 * players - 1:
    for i in range(players):
        if i+1 != pid:
            print i+1,
    print
else:
    for i in range(rounds):
        lines.append(sys.stdin.readline())
    lastline = lines[-1]
    takes = re.findall(r'\([0-9]+, [0-9]+\)', lastline)
    for take in takes:
        sides = [int(i) for i in re.findall(r'[0-9]+', take)]
        if sides[1] == pid:
            print sides[0],
    print
added 734 characters in body
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

import sys
import re

line1 = [int(i) for i in sys.stdin.readline().split()]

players = line1[0]
pid = line1[1]
rounds = line1[2]

lines = []

if rounds == 0:
    print
elif rounds == 25 * players - 1:
    for i in range(players):
        if i+1 != pid:
            print i+1,
    print
else:
    for i in range(rounds):
        lines.append(sys.stdin.readline())
    lastline = lines[-1]
    takes = re.findall(r'\([0-9]+, [0-9]+\)', lastline)
    for take in takes:
        sides = [int(i) for i in re.findall(r'[0-9]+', take)]
        if sides[1] == pid:
            print sides[0],
    print

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

import sys
import re

line1 = [int(i) for i in sys.stdin.readline().split()]

players = line1[0]
pid = line1[1]
rounds = line1[2]

lines = []

if rounds == 0:
    print
elif rounds == 25 * players - 1:
    for i in range(players):
        if i+1 != pid:
            print i+1,
    print
else:
    for i in range(rounds):
        lines.append(sys.stdin.readline())
    lastline = lines[-1]
    takes = re.findall(r'\([0-9]+, [0-9]+\)', lastline)
    for take in takes:
        sides = [int(i) for i in re.findall(r'[0-9]+', take)]
        if sides[1] == pid:
            print sides[0],
    print
update
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80

#Tit-for-tat WG9tUFvogYOvMMsJWrdteBhlS90vr6eUBVy3soEgL84=9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

#Tit-for-tat WG9tUFvogYOvMMsJWrdteBhlS90vr6eUBVy3soEgL84= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

#Tit-for-tat 9GkjtTDD2jrnMYg/LSs2osiVWxDDoSOgLCpWvuqVmSM= Similar to Wrathful, with a few (hopefully) performance-enhancing changes.

Used Joe Z.'s oficial verify.py to calculate hash
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80
Loading
added 366 characters in body
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80
Loading
changed order
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80
Loading
more detail
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80
Loading
Source Link
Ypnypn
  • 10.9k
  • 2
  • 31
  • 80
Loading