Submission #4337369


Source Code Expand

Copy
#!usr/bin/env python3
from collections import defaultdict
import math
import bisect
import random
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def IIR(n): return [II() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
mod = 1000000007

# A
x,y = LI()
print(max(x,y))

# B
'''
s = input()
list = "aiueo"
for i in range(len(list)):
    s = s.replace(list[i],"")
for i in range(len(s)):
    print(s[i], end = "")
'''

# C
"""
x,y,a,b,c,d = LI()
print(abs((a-x)*(d-y)-(b-y)*(c-x))/2)
"""
# D
n,m = LI()
f = [[0 if i != j else 1 for j in range(n)] for i in range(n)]
for i in range(m):
    x,y = LI()
    x -= 1
    y -= 1
    f[x][y] = 1
    f[y][x] = 1
bi = [bin(i)[2:] for i in range(1,2**n)]

li = []
for i in range(2**n-1):
    a = []
    for j in range(len(bi[i])):
        if bi[i][len(bi[i])-1-j] == "1":
            a.append(j)
    li.append(a)

ans = 0
for l in li:
    st = False
    for i in range(1,len(l)):
        for j in range(i):
            if not f[l[i]][l[j]]:
                st = True
                break
        if st:
            break
    if not st:
        ans = max(ans,len(l))
print(ans)

Submission Info

Submission Time
Task A - 正直者
User dn6049949
Language PyPy3 (2.4.0)
Score 0
Code Size 1325 Byte
Status
Exec Time 188 ms
Memory 39024 KB

Test Cases

Set Name Score / Max Score Test Cases
all 0 / 100 00_sample_01.txt, 00_sample_02.txt, kensho_diff01, kensho_diff02, kensho_diff03, kensho_diff04, kensho_diff05, kensho_min-max01, kensho_min-max02, kensho_min-max03, kensho_min-max04, kensho_min-max05, kensho_min-max06, kensho_min-max07, kensho_min-max08, kensho_min-max09, kensho_min-max10, kensho_rand01, kensho_rand02, kensho_rand03, kensho_rand04, kensho_rand05, kensho_rand06, kensho_rand07, kensho_rand08, kensho_rand09, kensho_rand10
Case Name Status Exec Time Memory
00_sample_01.txt 188 ms 39024 KB
00_sample_02.txt 178 ms 38512 KB
kensho_diff01 177 ms 38512 KB
kensho_diff02 177 ms 38512 KB
kensho_diff03 180 ms 38512 KB
kensho_diff04 176 ms 38512 KB
kensho_diff05 175 ms 38512 KB
kensho_min-max01 176 ms 38512 KB
kensho_min-max02 178 ms 38512 KB
kensho_min-max03 178 ms 38512 KB
kensho_min-max04 176 ms 38512 KB
kensho_min-max05 184 ms 38512 KB
kensho_min-max06 183 ms 38512 KB
kensho_min-max07 187 ms 38512 KB
kensho_min-max08 180 ms 38512 KB
kensho_min-max09 178 ms 38512 KB
kensho_min-max10 179 ms 38512 KB
kensho_rand01 177 ms 38512 KB
kensho_rand02 178 ms 38512 KB
kensho_rand03 182 ms 38512 KB
kensho_rand04 181 ms 38512 KB
kensho_rand05 180 ms 38512 KB
kensho_rand06 180 ms 38512 KB
kensho_rand07 181 ms 38512 KB
kensho_rand08 178 ms 38512 KB
kensho_rand09 177 ms 38512 KB
kensho_rand10 183 ms 38512 KB