君はまるで砂漠に咲く、一輪の花。

僕はその花に引き寄せられる蝶。

Codeforces Testing Round #3

はい。
http://codeforces.com/contest/134

A. Average Numbers

brute force,implementation

ざっくりと大意

・平均と等しい値が何番目にあるかかな?

方針のようなもの

・先頭から適当に見ても間に合うと思う。

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
n=int(raw_input())
l=[int(x) for x in raw_input().split()]
av=sum(l)/len(l)
k=av*len(l)
if k!=sum(l):
    print 0
    exit()
if av not in l:
    print 0
else:
    print l.count(av)
    c=1
    for i in l:
        if i==av:
            print c,
        c+=1

B. Pairs of Numbers

brute force,dfs and similar,math,number theory

ざっくりと大意

・(a,b)=(1,1)から初めて、(a+b,b)か(a,a+b)のどちらかを行い最短何回目でkになるか??

方針のようなもの

・単に最短で増加させるだけなら(a+b,b)と(a,a+b)交互に実行だと思うけど、それだと通り過ぎてしまう数があるのがダメかな??
・ 破綻したら1手戻して違う方の式を使うか、事前に早く破綻を察知し破綻でないほうの式を使うか??? どちらも書けず保留。

C. Swaps

constructive algorithms,graphs,greedy

ざっくりと大意

・n人のプレイヤーがテーブルを囲んで座っている。
・テーブル上にn色s枚のカードが置いてある。