Source stringclasses 1
value | Date int64 2.01k 2.02k | Text stringlengths 22 783k | Token_count int64 20 394k |
|---|---|---|---|
Project_CodeNet | 2,020 | open Printf
open Scanf
let solve a b = a * b / 2
let () =
scanf "%d %d " solve |> printf "%d\n"
| 36 |
Project_CodeNet | 2,020 | let _ = Scanf.sscanf (read_line ()) "%d %d %d" (fun ab bc ca ->
print_endline (string_of_int (ab * bc / 2))
) | 41 |
Project_CodeNet | 2,019 | Module P1
Sub main()
Dim RD As String
Dim SD() As String
Dim AB As Long
Dim BC As Long
Dim ans As Long
RD = Console.Readline()
SD = Split(RD, " ")
AB = SD(0)
BC = SD(1)
ans = AB * BC / 2
Console.Writeline (ans)
End Sub
end Module
| 94 |
Project_CodeNet | 2,019 | Module _20190422
Sub Main()
Dim sRead As String = Console.ReadLine()
Dim iAB As Integer = sRead.Split(" ")(0)
Dim iBC As Integer = sRead.Split(" ")(1)
Dim iCA As Integer = sRead.Split(" ")(2)
Console.WriteLine((iAB * iBC) / 2)
End Sub
End Module | 85 |
Project_CodeNet | 2,019 | use std::collections::HashSet;
fn main() {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
let mut set = buf.split_whitespace()
.map(|s| s.parse::<usize>().unwrap())
.collect::<HashSet<usize>>();
let r = set.clone();
let max = r.iter().max().unwrap();
... | 102 |
Project_CodeNet | 2,020 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io::Read;
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).unwrap();
... | 396 |
Project_CodeNet | 2,019 | // Template from https://techracho.bpsinc.jp/jhonda/2019_08_05/78537
// input macro for competive-programming from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[allow(unused_macros)]
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{i... | 659 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io::Read;
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).unwrap();
... | 523 |
Project_CodeNet | 2,019 | #![allow(non_snake_case, unused)]
use std::collections::*;
use std::cmp::{min, max};
////////// missing functions in 1.15.1 //////////
macro_rules! eprint {
($($t:tt)*) => {{
use ::std::io::Write;
let _ = write!(::std::io::stderr(), $($t)*);
}};
}
macro_rules! eprintln {
() => { eprintln!(""); };
($($t:tt)*) =... | 846 |
Project_CodeNet | 2,020 | // This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;
fn main() {
input! {
a:i32, b:i32,
}
println!("{}", a * b / 2);
}
*/
fn main() {
let exe = "/tmp/binDD5A6FEB"... | 202,098 |
Project_CodeNet | 2,019 | #[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
read::<String>()
.split_whitespace()
.map(|e| e.parse().ok()... | 229 |
Project_CodeNet | 2,019 | use std::io::prelude::*;
use std::io::stdin;
use std::str::FromStr;
fn main() {
let ab: i32 = read();
let bc: i32 = read();
print!("{}", (ab * bc) / 2);
}
fn read<T: FromStr>() -> T {
let stdin = stdin();
let token: String = stdin
.lock()
.bytes()
.map(|b| b.unwrap() as cha... | 138 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stdin, stdout, BufWriter, Write};
#[allow(unused_imports)]
use std::iter::FromIterator;
mod util {
use std:... | 970 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::cmp::Ordering::{Equal, Greater, Less};
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stdin, stdout, BufWriter, Write};
#[allow(unused... | 608 |
Project_CodeNet | 2,019 | fn read<T: std::str::FromStr>(
stdin_lock: &mut std::io::StdinLock,
buf: &mut Vec<u8>,
delimiter: u8,
) -> T {
buf.clear();
let l = std::io::BufRead::read_until(stdin_lock, delimiter, buf).unwrap();
buf.truncate(l - 1); // remove delimiter
let s = unsafe { std::str::from_utf8_unchecked(&buf)... | 322 |
Project_CodeNet | 2,019 | macro_rules! input {
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
let mut next = || -> String {
bytes
.by_ref()
.map(|r|r.unwrap() as char)
.skip_while(|... | 491 |
Project_CodeNet | 2,019 | fn main() {
fn read<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
read::<String>().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}
let ABC = rea... | 123 |
Project_CodeNet | 2,019 | use std::io::stdin;
fn main() {
let stdin = stdin();
let mut buf = String::new();
stdin.read_line(&mut buf).unwrap();
let buf: Vec<i32> = buf.split_whitespace().map(|n| n.parse().unwrap()).collect();
let ab = buf[0];
let bc = buf[1];
let ca = buf[2];
let s = (ab + bc + ca) / 2... | 142 |
Project_CodeNet | 2,019 | use std::io::prelude::*;
fn input<T>() -> T
where
T: std::str::FromStr,
{
let stdin = std::io::stdin();
let token = stdin
.lock()
.bytes()
.map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>()... | 151 |
Project_CodeNet | 2,019 | // https://atcoder.jp/contests/abc116/tasks/abc116_a
#[allow(unused)]
use std::cmp::{max, min};
#[allow(unused)]
use std::collections::HashSet;
#[allow(unused)]
use std::collections::VecDeque;
use std::io;
use std::io::{BufRead, Read, Write};
use std::str::FromStr;
#[allow(unused, non_snake_case)]
pub fn solve<R: Buf... | 500 |
Project_CodeNet | 2,020 | use proconio::{input, fastout};
macro_rules! debug {
($($a:expr),*) => {
eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
}
}
#[fastout]
fn main() {
input!{
a: usize,
b: usize,
c: usize,
}
println!("{}", a*b/2);
}
| 91 |
Project_CodeNet | 2,019 | #[doc = " https://github.com/hatoo/competitive-rust-snippets"]
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stdin, stdout, BufWriter, Write};
#[allow(unused... | 909 |
Project_CodeNet | 2,019 | mod io{
use std::io::*;
pub fn read<T: ::std::str::FromStr>()->T{
let stdin=stdin();
let ret=stdin.lock().bytes().map(|c|c.unwrap()as char)
.skip_while(|c|c.is_whitespace())
.take_while(|c|!c.is_whitespace())
.collect::<String>().parse().ok().unwrap();
ret
}
}... | 156 |
Project_CodeNet | 2,019 | use std::io::*;
use std::str::FromStr;
fn main() {
let ab: usize = read();
let bc: usize = read();
let _: usize = read();
println!("{}", ab * bc / 2);
}
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c... | 134 |
Project_CodeNet | 2,019 | #[allow(unused_macros)]
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read... | 576 |
Project_CodeNet | 2,020 | #![allow(unused_imports)]
use proconio::{input, fastout};
use proconio::marker::*;
#[fastout]
fn main() {
input! {
mut a:[usize; 3]
}
a.sort();
let ans = a[0] * a[1] / 2;
println!("{}", ans);
}
| 74 |
Project_CodeNet | 2,019 | macro_rules! debug {
( $x:ident [ $i:expr ] ) => {
if cfg!(debug_assertions) {
println!("{}[{}] = {}", stringify!($x), $i, $x[$i]);
}
};
( $x:ident [ $i:expr ][ $j:expr ] ) => {
if cfg!(debug_assertions) {
println!("{}[{}][{}] = {}", stringify!($x), $i, $j, $x... | 633 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::cmp;
#[allow(unused_imports)]
use std::collections::*;
use std::usize;
#[allow(unused_imports)]
use std::vec::Vec;
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
inpu... | 485 |
Project_CodeNet | 2,020 | use std::io::Read;
fn main() {
let mut s: String = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let a: usize = itr.next().unwrap().parse().unwrap();
let b: usize = itr.next().unwrap().parse().unwrap();
let _: usize = itr.next().unwrap(... | 106 |
Project_CodeNet | 2,020 | use std::io::*;
use std::str::FromStr;
/*
The read function reads a string according to each one.
*/
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while(|c| c... | 220 |
Project_CodeNet | 2,019 | /*------------------------------------------------------------------*/
/*------------------------- begin template -------------------------*/
/*------------------------------------------------------------------*/
// ref: tanakh <https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8>
// diff: using Parser
macro_rules! in... | 1,100 |
Project_CodeNet | 2,020 | use std::io::*;
fn main() {
let mut s: String = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let a: usize = itr.next().unwrap().parse().unwrap();
let b: usize = itr.next().unwrap().parse().unwrap();
let _: usize = itr.next().unwrap().pa... | 102 |
Project_CodeNet | 2,019 | use std::io::stdin;
fn main () {
let mut l = String::new();
stdin().read_line(&mut l).unwrap();
let l: Vec<isize> = l.trim().split_whitespace().take(2).flat_map(str::parse).collect();
println!("{}", l[0] * l[1] / 2);
}
| 76 |
Project_CodeNet | 2,019 | // https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let mut s = {
use std::io::Read;
let mut s = String::new();
... | 424 |
Project_CodeNet | 2,019 | use std::io::*;
use std::str::FromStr;
#[allow(dead_code)]
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.i... | 154 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
use std::io::*;
use std::str::FromStr;
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_macros)]
macro_rules! debug {
($($a:expr),*) => {
println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
}
... | 325 |
Project_CodeNet | 2,019 | // たなこふ先生の input マクロ (´・_・`)
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[allow(unused_macros)]
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io:... | 456 |
Project_CodeNet | 2,019 | use std::io;
fn main() {
let mut abc = read::<usize>();
abc.sort();
println!("{}", abc[0] * abc[1] / 2);
}
#[allow(dead_code)]
fn read<T>() -> Vec<T>
where T:
std::str::FromStr,
T::Err: std::fmt::Debug {
let mut buf = String::new();
io::stdin().read_line(&mut buf).unwrap();
buf.split_whites... | 181 |
Project_CodeNet | 2,020 | use std::io;
use std::str::FromStr;
use std::cmp::max;
fn input_tuple() -> (u64, u64, u64) {
let mut line: String = String::new();
io::stdin().read_line(&mut line);
let vec: Vec<u64> = line.split_whitespace().map(|s| s.parse().unwrap()).collect();
(vec[0], vec[1], vec[2])
}
fn main() {
let (a, b, ... | 180 |
Project_CodeNet | 2,019 | fn read_line() -> String {
let mut s = String::new();
std::io::stdin().read_line(&mut s).unwrap();
s.trim_right().to_owned()
}
fn str_to_ints(s: String) -> std::vec::Vec<i64> {
let mut ret = std::vec::Vec::new();
let ws = s.split_whitespace();
for w in ws {
ret.push(w.parse().unwrap());... | 231 |
Project_CodeNet | 2,019 | pub trait FromFragments: Sized {
fn fragments_count() -> usize;
fn from_fragments(fragments: &[&str]) -> Result<Self, String>;
}
impl FromFragments for () {
fn fragments_count() -> usize {
1
}
fn from_fragments(_fragments: &[&str]) -> Result<(), String> {
Ok(())
}
}
impl FromFrag... | 1,684 |
Project_CodeNet | 2,020 | use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
let mut s = String::new();
std::io::stdin().read_line(&mut s).unwrap();
s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()
}
fn mai... | 137 |
Project_CodeNet | 2,020 | use std::io;
fn procon_read<T: std::str::FromStr>() -> Vec<T> {
let mut buf = String::new();
io::stdin().read_line(&mut buf).expect("");
let iter = buf.split_whitespace();
let mut v: Vec<T> = Vec::new();
for i in iter {
v.push(i.parse().ok().unwrap());
}
v
}
fn main() {
let v: Vec<i32> = procon_read();
le... | 122 |
Project_CodeNet | 2,020 | use proconio::input;
fn main (){
let mut _ab : f64;
let mut _bc : f64;
let mut _ca : f64;
input! {
ab : f64,
bc : f64,
ca : f64,
}
let ans : f64 = (bc/2.0)*ab ;
println!("{}",ans);
}
| 78 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read::bytes(std::io::BufRead... | 442 |
Project_CodeNet | 2,020 | use proconio::{fastout, input};
#[fastout]
fn main() {
input!(n: [usize; 3]);
let max = n.iter().max().unwrap();
let mut menseki: f64 = 1.0;
for v in &n {
if *v == *max {
continue;
}
menseki *= *v as f64;
}
println!("{}", menseki / 2.0);
}
| 101 |
Project_CodeNet | 2,019 | use std::io::stdin;
fn main() {
let mut s = String::new();
stdin().read_line(&mut s).ok();
let vs: Vec<u16> = s.trim().split_whitespace().map(|token| token.parse().ok().unwrap()).collect();
print!("{}", vs[0] * vs[1] / 2);
}
| 76 |
Project_CodeNet | 2,019 | #[allow(unused_macros)]
macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; let mut next = || { iter . next ( ) . unwrap ( ) } ; input_inner ! { next , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let stdin = std :: io :: stdin ( ) ; let mut bytes = std :: io... | 536 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read::bytes(std::io::BufRead... | 441 |
Project_CodeNet | 2,020 | // This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
#![allow(non_snake_case)]
#![allow(unused_imports)]
use proconio::{input, fastout};
use proconio::marker::*;
use whiteread::parse_line;
use std::collections::*;
#[fastout]
fn main() {
input!{
... | 204,186 |
Project_CodeNet | 2,019 | // 参考
// https://techracho.bpsinc.jp/jhonda/2019_08_05/78537
// Input macro
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io::Read;
let mut s = S... | 636 |
Project_CodeNet | 2,020 | #![allow(unused_imports)]
use text_io::*;
use proconio::*;
use std::collections::*;
use std::process::exit;
use std::cmp::*;
use itertools::Itertools;
fn main() {
input! {
a:f64,
b:f64,
c:f64,
}
println!("{}",a*b/2.0)
} | 75 |
Project_CodeNet | 2,020 | // use proconio::marker::Chars;
use proconio::{fastout, input};
// use std::cmp::{max, min};
#[fastout]
fn main() {
input! {
l: [usize; 3]
};
let mut l = l;
l.sort();
println!("{}", l[0] * l[1] / 2);
}
| 81 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read::bytes(std::io::BufRead... | 480 |
Project_CodeNet | 2,020 | // This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_imports)]
use std::... | 240,500 |
Project_CodeNet | 2,019 | use std::vec::Vec;
use std::cmp::*;
fn read<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
read::<String>().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()... | 155 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::str::*;
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_imports)]
use std::cmp::{min,max};
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { it... | 619 |
Project_CodeNet | 2,019 | #![allow(unused)]
use std::{cell, cmp, collections, fmt, ops};
use cell::{Cell, RefCell};
use cmp::Ordering;
use collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
use fmt::{Debug, Display};
use ops::{
Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Not, S... | 2,071 |
Project_CodeNet | 2,019 | fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).unwrap();
let s = s.split_whitespace();
let mut nums = Vec::new();
for edge in s {
nums.push(edge.parse::<u32>().unwrap());
}
println!("{}", &nums[0] * &nums[1] / 2);
} | 83 |
Project_CodeNet | 2,019 | use std::io;
fn main() {
let mut s = String::new();
let _ = io::stdin().read_line(&mut s);
let mut s = s.trim_right().split_whitespace();
let a = s.next().unwrap();
let b = s.next().unwrap();
let a = a.parse::<usize>().unwrap();
let b = b.parse::<usize>().unwrap();
println!("{}", a *... | 95 |
Project_CodeNet | 2,019 | #[allow(unused_macros)]
macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read... | 541 |
Project_CodeNet | 2,019 | #[allow(unused_macros)]
macro_rules! my_write {
($writer:expr, $args:expr) => {
$writer.write($args).unwrap()
};
($writer:expr, $($args:expr),*) => {
{
let mut buf = Vec::new();
$(buf.write($args).unwrap();)*
$writer.write(&buf).unwrap()
}
};
}
use std::io::{ stdin, stdout, Write ... | 2,780 |
Project_CodeNet | 2,019 | fn main() {
let n: Vec<i32> = read_vec();
println!("{}", n[0] * n[1] / 2);
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().split_whitespace()
.map(|e| e.parse().ok().unwrap()).collect()
} | 97 |
Project_CodeNet | 2,019 | #[allow(unused_macros)]
macro_rules! get {
([$t:ty] ; $n:expr) => {
(0..$n)
.map(|_| get!([$t])).collect::<Vec<_>>()
};
($($t:ty),+ ; $n:expr) => {
(0..$n).map(|_| get!($($t),+)).collect::<Vec<_>>()
};
([$t:ty]) => {
rl().split_whitespace()
.map(|x| x.parse().... | 269 |
Project_CodeNet | 2,019 | fn main() {
let mut buf = String::new();
let handle = std::io::stdin();
let info: Vec<isize> = {
handle.read_line(&mut buf).unwrap();
let tmp = buf.trim().split_whitespace().map(|a| a.parse().unwrap()).collect();
buf.clear();
tmp
};
println!("{}", info[0] * info[1] / ... | 91 |
Project_CodeNet | 2,019 | #![allow(unused_mut, non_snake_case, unused_imports, dead_code)]
use std::iter;
use std::cmp::{max, min, Ordering};
use std::mem::swap;
use std::collections::{HashMap, BTreeMap, HashSet, BTreeSet, BinaryHeap, VecDeque};
use std::iter::FromIterator;
// 高速 EOF要
//macro_rules! input {(source = $s:expr, $($r:tt)*) => {le... | 851 |
Project_CodeNet | 2,020 | use std::io::Read;
fn main() {
let mut buf = String::new();
std::io::stdin().read_to_string(&mut buf).unwrap();
let answer = solve(&buf);
println!("{}", answer);
}
fn solve(input: &str) -> String {
let mut iterator = input.split_whitespace();
let ab: usize = iterator.next().unwrap().parse()... | 133 |
Project_CodeNet | 2,019 | use std::io;
fn right_triangle() -> u32 {
let mut abc = String::new();
io::stdin().read_line(&mut abc).unwrap();
let abc: Vec<u32> = abc.trim_right()
.split_whitespace()
.map(|e| e.parse::<u32>().unwrap())
.collect();
abc[0] * abc[1] / 2
}
fn main() {
let ans = right_triang... | 103 |
Project_CodeNet | 2,019 | #![allow(unused_variables)]
#![allow(unused_imports)]
#![allow(dead_code)]
use std::io;
use std::str::FromStr;
use std::iter::FromIterator;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::mem::{replace, swap};
// abcde
fn read_string() -> String {
let mut line = String::new();
io::stdin(... | 472 |
Project_CodeNet | 2,020 | // ref: https://qiita.com/tubo28/items/e6076e9040da57368845
use std::io::{stdin, Read};
use std::str::FromStr;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while... | 181 |
Project_CodeNet | 2,019 | fn read<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
read::<String>()
.split_whitespace()
.map(|e| e.parse().ok().unwrap())
.collect()
}
fn read_... | 180 |
Project_CodeNet | 2,019 | use std::io;
fn read() -> Vec<i32> {
let mut input = String::new();
io::stdin().read_line(&mut input).unwrap();
input.trim().split(' ').map(|x| x.parse().ok().unwrap()).collect()
}
fn main() {
let inputs = read();
println!("{}", inputs[0] * inputs[1] / 2);
}
| 84 |
Project_CodeNet | 2,019 | use std::io::Read;
fn main() {
let mut buf = String::new();
std::io::stdin().read_to_string(&mut buf).unwrap();
let mut iter = buf.split_whitespace();
let ab: usize = iter.next().unwrap().parse().unwrap();
let bc: usize = iter.next().unwrap().parse().unwrap();
let _ca: usize = iter.next().unw... | 102 |
Project_CodeNet | 2,020 | use std::collections::HashSet;
use std::io::Read;
fn main() {
let mut buf = String::new();
std::io::stdin().read_to_string(&mut buf).unwrap();
let mut iter = buf.split_whitespace();
let ab: usize = iter.next().unwrap().parse().unwrap();
let bc: usize = iter.next().unwrap().parse().unwrap();
pr... | 93 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
let mut next = || { iter.next().unwrap() };
input_inner!{next, $($r)*}
};
($($r:tt)*) => {
let stdin = std::io::stdin();
let mut bytes = std::io::Read::bytes(std::io::BufRead... | 492 |
Project_CodeNet | 2,020 | use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
... | 202 |
Project_CodeNet | 2,019 | #[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stderr, stdin, stdout, BufWriter, StdoutLock, Write};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[a... | 996 |
Project_CodeNet | 2,019 | use std::cmp::{max, min};
use std::io::{self, Read};
use std::iter::FromIterator;
#[allow(dead_code)]
struct Source {
chars: Box<Iterator<Item = char>>,
}
#[allow(dead_code)]
impl Source {
fn next_chr(&mut self) -> char {
self.chars
.by_ref()
.skip_while(|c| char::is_whitespace... | 684 |
Project_CodeNet | 2,019 | macro_rules! input {
(source = $s:expr, $($r:tt)*) => {
let mut iter = $s.split_whitespace();
input_inner!{iter, $($r)*}
};
($($r:tt)*) => {
let s = {
use std::io::Read;
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).unwrap();
... | 600 |
Project_CodeNet | 2,020 | use std::io::*;//Not mine.
use std::str::FromStr;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitesp... | 166 |
Project_CodeNet | 2,019 | fn main() {
let s = std::io::stdin();
let mut sc = Scanner { reader: s.lock() };
let a: usize = sc.read();
let b: usize = sc.read();
let c: usize = sc.read();
let mut t = vec![a, b, c];
t.sort();
println!("{}", t[0] * t[1] / 2);
}
pub struct Scanner<R> {
reader: R,
}
impl<R: std::i... | 316 |
Project_CodeNet | 2,019 | #![allow(non_snake_case, unused_imports)]
// Input
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufRead... | 460 |
Project_CodeNet | 2,019 | // -----------------------------------------------
// Framework <https://github.com/vain0x/procon>
//
// See the bottom of file for solution.
// -----------------------------------------------
#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::coll... | 448 |
Project_CodeNet | 2,019 | (let((a(read))(b(read))(c(read)))
(display(/(* a c)2))
)
| 23 |
Project_CodeNet | 2,019 | (define (main args)
(let ([ab (read)]
[bc (read)])
(print
(/ (* ab bc) 2)))
0)
| 36 |
Project_CodeNet | 2,019 | (define a (read))
(define b (read))
(write (quotient (* a b) 2))
(newline) | 24 |
Project_CodeNet | 2,019 | (display (let ((a (read)) (b (read)) (c (read))) (/ (* a b c) (max a b c) 2))) | 33 |
Project_CodeNet | 2,019 | (define ab (read))
(define bc (read))
(display (/ (* ab bc) 2))
(newline) | 22 |
Project_CodeNet | 2,019 | namespace sample {
class Scanner {
private buffer: string = '';
private stdinQueue: any = [];
constructor() {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on(
'data',
(chunk): void => {
this.buffer += chunk;
while (this.std... | 358 |
Project_CodeNet | 2,019 | function main(input: string): void {
const [a, b] = input.split(' ').map(Number); // c is unnecessary
const ans = a * b / 2;
console.log(ans);
}
import * as fs from 'fs';
main(fs.readFileSync('/dev/stdin', 'utf8'));
| 65 |
Project_CodeNet | 2,019 | const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};con... | 294 |
Project_CodeNet | 2,019 | const solve = (input) => {
const [ab, bc, ca] = input.split(" ").map(Number)
return (ab * bc) / 2
}
if (process.env.NODE_ENV === "test") {
module.exports = (input) => solve(input.trim())
} else {
const input = require("fs").readFileSync("/dev/stdin", "utf8")
console.log(solve(input.trim()))
}
| 91 |
Project_CodeNet | 2,020 | import * as fs from 'fs';
namespace AtCoder.abc116 {
export class Program {
/**
* in
*
* out
*
*/
static main(inp: string): void {
const inpList: number[] = inp.split(' ').map(x => parseInt(x, 10)).sort((a, b) => {
return a -... | 125 |
Project_CodeNet | 2,019 | function main(input) {
input = input.trim();
const [a, b, c] = input.split(" ").map(n => Number(n));
const result = a*b/2;
console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8")); | 62 |
Project_CodeNet | 2,019 | const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')
const [ab, bc] = stdin.split('\n')[0].split(' ').map(Number)
const res = ab * bc / 2
console.log(res)
| 52 |
Project_CodeNet | 2,019 | var input: string = require('fs').readFileSync('/dev/stdin', 'utf8');
var parts = input.split(" ");
var A = parseInt(parts[0]);
var B = parseInt(parts[1]);
var C = parseInt(parts[2]);
console.log(A*B/2); | 58 |
Project_CodeNet | 2,020 | const funcA = (input: string): void => {
const hoge: number[] = input.split(" ").map(Number);
const fuga: number[] = hoge.slice().sort(
(a: number, b: number): number => { return a-b; }
);
console.log((fuga[0]*fuga[1]) / 2);
}
funcA(require('fs').readFileSync('/dev/stdin', 'utf8')); | 97 |
Project_CodeNet | 2,020 | get_number(Number) :-
get_string(String),
number_string(Number, String).
get_string(String) :-
current_input(Input),
read_string(Input, ' \n', '', _, String).
/* memo
code(int)
string_code(1, S, C), (C: code)
char_code(X, Y) (X: char, Y: code)
string_chars(S, S2) (S: string, S2: [char]... | 277 |
Project_CodeNet | 2,019 | <?php
fscanf(STDIN, "%d %d %d", $a,$b,$c);
echo ($a * $b) / 2;
?> | 34 |
Project_CodeNet | 2,019 | <?php
list($a, $b, $_) = explode(" ", trim(fgets(STDIN)));
echo $a * $b / 2; | 33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.