Skip to content

Instantly share code, notes, and snippets.

View oyakodon's full-sized avatar

Oyakodon oyakodon

View GitHub Profile

Atomの設定を「Sync-Settings」で共有する。

@oyakodon
oyakodon / arc045_B_unfinished.cs
Created March 28, 2016 14:49
ARC045のB問題(未完成)です。 / C#
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var l = ReadInt();
var N = l[0];
var M = l[1];
@oyakodon
oyakodon / A.cs
Created March 26, 2016 15:37
ABC035で実際に使ったプログラムたち。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var input = Console.ReadLine().Split();
var W = int.Parse(input[0]);
var H = int.Parse(input[1]);
if ( W % 16 != 0 || H % 9 != 0 )
@oyakodon
oyakodon / gist:06324af2a2535d429394
Created March 25, 2016 13:52
最初のツイートから何番目のツイートは何なのか?(関数のみ) / C#
static Status getNumOfTweet(Tokens t, int targetNum)
{
// targetNum番目のツイートを返す(過去3200ツイート中で)
// [注意] 3200ツイート以上のロードが必要な場合、取得できる限り取得してツイートを返す。
// なんか3200土10ぐらいの差があるが、そこら辺までしか取得できない。
var me = t.Account.UpdateProfile();
var targetCount = me.StatusesCount - targetNum;
if (targetCount == 0 )
{
@oyakodon
oyakodon / tweet_yamato.py
Created March 24, 2016 14:37
ヤマト運輸の荷物を追跡して、得た情報をツイートする。 / Python, Tweepy
#! /usr/bin/env python2.7
#coding: utf-8
import json
import requests
import tweepy # pip install tweepy
KEY = ""
SECRET = ""
ATOKEN = ""
ASECRET = ""
@oyakodon
oyakodon / simpleBot.cs
Created March 23, 2016 15:20
Simple Bot for Twitter / C# Console
using System;
using System.Collections.Generic;
using CoreTweet;
class Program
{
static void Main(string[] args)
{
// トークン設定
@oyakodon
oyakodon / simpleTwitter.cs
Created March 22, 2016 14:52
Simple Twitter Client / C# Console
using System;
using CoreTweet; // NuGetからインストールできます(使用したのはVer. 0.6.1.267)
using CoreTweet.Streaming;
namespace simpleTwitter
{
class Program
{
static void Main(string[] args)
{
@oyakodon
oyakodon / A.cs
Created March 19, 2016 14:02
ARC049で実際に使ったプログラム。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var S = Console.ReadLine();
var Nums = Console.ReadLine().Split();
var ret = "";
for(var i = 0; i < S.Length; ++i )
@oyakodon
oyakodon / A.cs
Created March 12, 2016 14:57
ABC034で実際に使ったプログラムたち。 / C#
using System;
class Program
{
static void Main(string[] args)
{
var input = Console.ReadLine().Split(' ');
var x = int.Parse(input[0]);
var y = int.Parse(input[1]);
if (x < y )
@oyakodon
oyakodon / class.cpp
Last active March 12, 2016 09:35
C++勉強中。今回はクラスで遊んでみた。 / C++
#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
using namespace std;
enum FoodCategory {
Bread,
Don,