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 <cstdio> | |
#include <cmath> | |
#include <cstring> | |
#include <ctime> | |
#include <iostream> | |
#include <algorithm> | |
#include <set> | |
#include <vector> | |
#include <tuple> | |
#include <sstream> |
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 <cstdio> | |
#include <cmath> | |
#include <cstring> | |
#include <ctime> | |
#include <iostream> | |
#include <algorithm> | |
#include <set> | |
#include <vector> | |
#include <tuple> | |
#include <sstream> |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <sys/time.h> | |
#include <random> | |
static double dtime(void); | |
static void bubble_sort(int *a, long n); | |
static int verify_sort(int *a, long n); | |
static double measure_sort(int *a, long 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 <stdlib.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
#include <random> | |
static double dtime(void); | |
extern int main(void); | |
const int rndmax = 32767; | |
static double dtime()/*実行時間を計る関数*/ | |
{ |
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 <cstdio> | |
#include <cmath> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
#include <set> | |
using namespace std; | |
typedef long long int ll; | |
#define rep(i,n) for(int i=0; i<(int)(n);i++) |
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 <cstdio> | |
#include <cmath> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
#include <set> | |
#include <map> | |
#include <queue> | |
using namespace std; |
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
use std::collections::BinaryHeap; | |
use std::cmp::Ordering; | |
use std::cmp::max; | |
use std::usize; | |
const INF : i64 = 1000000000000000000; | |
#[derive(Clone)] | |
struct Edge { | |
to : usize, | |
cost : i64, |
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
use std::io; | |
fn main() { | |
let s = next_line(); | |
let s = s.trim(); | |
let t = getint(); | |
let mut cnt = 0; | |
let mut x = 0; | |
let mut y = 0; | |
for c in s.chars() { | |
match c { |
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
fn main() { | |
let input = getvec(); | |
let n = input[0]; | |
let q = input[1]; | |
let ns = n as usize; | |
let mut imos = vec![0; ns]; | |
for _ in 0..q { | |
let temp = getvec(); | |
let s = temp[0] as usize; | |
let g = temp[1] as usize; |
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
fn main() { | |
let a = next_line(); | |
let b = getint() - 1; | |
let it = b as usize; | |
let c = a.as_bytes()[it] as char; | |
println!("{}\n", c); | |
} | |
fn next_line() -> String { | |
let mut input = String::new(); |
OlderNewer