This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T = int(input()) | |
| for t in range(T): | |
| D = list(map(int, input().split())) | |
| N = int(input()) | |
| S = set() | |
| for i in range(N): | |
| s = input() | |
| s = "".join(str(D[ord(c)-ord("A")]) for c in s) | |
| S.add(s) | |
| if len(S)==N: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| # ババ抜きをシミュレート | |
| # n: 人数 | |
| # s: 配り始める人 | |
| def simulate(n, s): | |
| C = [0] | |
| for i in range(1, 14): | |
| C += [i]*4 | |
| random.shuffle(C) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import random | |
| import json | |
| import time | |
| import urllib.request | |
| import urllib.error | |
| from copy import deepcopy | |
| # ゲームサーバのアドレス / トークン |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fractions import Fraction | |
| import math | |
| import random | |
| # 内積 | |
| def prod(u, v): | |
| return sum(x*y for x, y in zip(u, v)) | |
| # Gram-Schmidtの直交化 | |
| # GSOベクトルのノルムの2乗 [|b0|^2, |b1|^2, ...] とGSO係数 mu を返す。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Wordle 386 4/6 | |
| ⬜⬜⬜⬜⬜ | |
| 🟨🟩🟩⬜⬜ | |
| ⬜⬜⬜⬜🟩 | |
| 🟩🟩🟩🟩🟩 | |
| Wordle 387 4/6 | |
| 🟨⬜🟩⬜⬜ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ブースター | |
| シャワーズ | |
| サンダース | |
| リーフィア | |
| ブラッキー | |
| エーフィ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T = int(input()) | |
| for t in range(1, T+1): | |
| N, K = map(int, input().split()) | |
| V = [1] | |
| for i in range(2, N, 2)[::-1]: | |
| for j in range(4): | |
| V += [V[-1]+i] | |
| V += [N*N, N*N] | |
| d = N*N-1-K | |
| c = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.powerlanguage.co.uk/wordle/ | |
| Wordle 225 5/6 | |
| ⬜⬜🟨⬜⬜ | |
| ⬜🟨⬜⬜⬜ | |
| 🟨🟨⬜⬜🟨 | |
| ⬜⬜⬜⬜⬜ | |
| 🟩🟩🟩🟩🟩 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sed -f | |
| # Check flag format | |
| # Some characters are used internally | |
| /^SECCON{[02-9A-HJ-Z_a-km-z]*}$/!{ | |
| cINVALID FORMAT | |
| b | |
| } | |
| :t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T = int(input()) | |
| for t in range(T): | |
| N = int(input()) | |
| S = input() | |
| ans = 0 | |
| last = "" | |
| for s in S: | |
| if (s=="O" or s=="X") and s!=last: | |
| last = s | |
| ans += 1 |