This file contains 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
#include <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main(void){ | |
// データを入力する | |
int N; | |
cin >> N; |
This file contains 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
#include <algorithm> | |
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <unordered_map> | |
using namespace std; | |
int main(void){ | |
// 単語リストに単語を代入する | |
int N; | |
cin >> N; |
This file contains 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
#include <iostream> | |
#include <set> | |
#include <string> | |
#define R(S) reverse(S.begin(), S.end()) | |
using namespace std; | |
int main(void){ | |
int N; | |
string temp_word, center_word = "", all_word = ""; | |
multiset<string> word; | |
cin >> N; |
This file contains 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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#define f strcmp | |
char W[11],T[11],L[5001],C[10001],R[5001],w[1000][11];int j,l,N,i,c=0;void F(char *s,char *d){l=strlen(s);for(j=0;j<l;++j)d[j]=s[l - j - 1];d[l]='\0';}int main(void){scanf("%d",&N);for(i=0;i<N;++i){scanf("%s",W);F(W,T);if(f(W,T))strcpy(w[c],W),++c;else strcat(C,W);}qsort(w,c,11,f);for(i=0;i<c;++i){F(w[i],T);if(f(w[i],T)<0 &&bsearch(T,w,c,11,f))strcat(L,w[i]);}F(L,R);printf("%s%s%s\n",L,C,R);} |
This file contains 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
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <iostream> | |
/* using宣言 */ | |
using std::cin; | |
using std::cout; | |
using std::endl; | |
/* 定数宣言 |
This file contains 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
try{ | |
// すべてのグラフィックデバイスを取得する | |
GraphicsDevice[] all_gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); | |
for(GraphicsDevice gd : all_gd){ | |
// 各グラフィックデバイスにおけるグラフィックス特性を取得する | |
GraphicsConfiguration[] all_gc = gd.getConfigurations(); | |
// 各グラフィックス特性に従い、その座標を取得してスクショを撮る | |
Robot robot = new Robot(gd); | |
for(GraphicsConfiguration gc : all_gc){ | |
BufferedImage images = robot.createScreenCapture(gc.getBounds()); |
This file contains 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
mes 1+"1" ;2 | |
mes "1"+1 ;11 | |
mes 1+"1A" ;2 | |
mes 1+"A1" ;1 | |
mes 1+"1" ;1 |
This file contains 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 java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
import javax.swing.JFrame; | |
import javax.swing.JOptionPane; | |
import javax.swing.JPanel; |
This file contains 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
def here?(uri) | |
(current_server.uri rescue nil) == uri | |
end | |
module_function :here? | |
def config | |
current_server.config | |
rescue | |
DRbServer.make_config | |
end |
This file contains 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
/* Hough変換のサンプル | |
* Hough変換した際は、 | |
* 直線→横×縦が角度分割数×(2 * 対角線長)に対応する | |
* (ここで対角線長を2倍しているのは負数を想定している) | |
* 円→横×縦が横×縦×半径に対応する | |
*/ | |
/* 引数の1つ目が「put」だったなら、counter*.pngを出力する */ | |
import java.awt.Color; |
OlderNewer