2019-03-01から1ヶ月間の記事一覧

picoCTF 2018: echooo

問題 問題文 This program prints any input you give it. Can you leak the flag? Connect with nc 2018shell.picoctf.com 3981. Source. Hints: If only the program used puts... 解答例 指針 format string attack による stack の読み込み 解説 与えら…

AtCoder Beginner Contest 098: D - Xor Sum 2

問題 問題文 https://atcoder.jp/contests/abc098/tasks/arc098_b 問題概要 長さ N の整数列 A が与えられる. 次の条件を満たす整数 l, r (1 <= l <= r <= N) の組の個数を求めよ. 制約 入力は整数 解答例 指針 尺取法 解説 条件を満たすのはどのようなとき…

picoCTF 2018: SpyFi

問題 問題文 James Brahm, James Bond's less-franchised cousin, has left his secure communication with HQ running, but we couldn't find a way to steal his agent identification code. Can you? Conect with nc 2018shell2.picoctf.com 37131. Sourc…

AtCoder Grand Contest 023: A - Zero-Sum Ranges

問題 問題文 https://atcoder.jp/contests/agc023/tasks/agc023_a 問題概要 長さ N の整数列 A が与えられる. A の空でない連続する部分列のうち, 総和が 0 となるものの個数を求めよ. 制約 解答例 指針 連続する部分列の総和 => 累積和 解説 初項を 0 とし,…

picoCTF 2018: be-quick-or-be-dead-2

問題 問題文 As you enjoy this music even more, another executable be-quick-or-be-dead-2 shows up. Can you run this fast enough too? You can also find the executable in /problems/be-quick-or-be-dead-2_2_7e92e9cc48bad623da1c215c192bc919. Hin…