Skip to content

Commit

Permalink
⚡️ abc259
Browse files Browse the repository at this point in the history
  • Loading branch information
reo11 committed Feb 2, 2024
1 parent 3148b1b commit 4963a23
Show file tree
Hide file tree
Showing 20 changed files with 445 additions and 0 deletions.
89 changes: 89 additions & 0 deletions atcoder/abc/abc201-300/abc259/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[package]
name = "abc259"
version = "0.1.0"
edition = "2018"

[package.metadata.cargo-compete.bin]
abc259-a = { alias = "a", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_a" }
abc259-b = { alias = "b", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_b" }
abc259-c = { alias = "c", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_c" }
abc259-d = { alias = "d", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_d" }
abc259-e = { alias = "e", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_e" }
abc259-ex = { alias = "ex", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_h" }
abc259-f = { alias = "f", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_f" }
abc259-g = { alias = "g", problem = "https://atcoder.jp/contests/abc259/tasks/abc259_g" }

[[bin]]
name = "abc259-a"
path = "src/bin/a.rs"

[[bin]]
name = "abc259-b"
path = "src/bin/b.rs"

[[bin]]
name = "abc259-c"
path = "src/bin/c.rs"

[[bin]]
name = "abc259-d"
path = "src/bin/d.rs"

[[bin]]
name = "abc259-e"
path = "src/bin/e.rs"

[[bin]]
name = "abc259-ex"
path = "src/bin/ex.rs"

[[bin]]
name = "abc259-f"
path = "src/bin/f.rs"

[[bin]]
name = "abc259-g"
path = "src/bin/g.rs"

[dependencies]
num = "=0.2.1"
num-bigint = "=0.2.6"
num-complex = "=0.2.4"
num-integer = "=0.1.42"
num-iter = "=0.1.40"
num-rational = "=0.2.4"
num-traits = "=0.2.11"
num-derive = "=0.3.0"
ndarray = "=0.13.0"
nalgebra = "=0.20.0"
alga = "=0.9.3"
libm = "=0.2.1"
rand = { version = "=0.7.3", features = ["small_rng"] }
getrandom = "=0.1.14"
rand_chacha = "=0.2.2"
rand_core = "=0.5.1"
rand_hc = "=0.2.0"
rand_pcg = "=0.2.1"
rand_distr = "=0.2.2"
petgraph = "=0.5.0"
indexmap = "=1.3.2"
regex = "=1.3.6"
lazy_static = "=1.4.0"
ordered-float = "=1.0.2"
ascii = "=1.0.0"
permutohedron = "=0.2.4"
superslice = "=1.0.0"
itertools = "=0.9.0"
itertools-num = "=0.1.3"
maplit = "=1.0.2"
either = "=1.5.3"
im-rc = "=14.3.0"
fixedbitset = "=0.2.0"
bitset-fixed = "=0.1.0"
proconio = { version = "=0.3.6", features = ["derive"] }
text_io = "=0.1.8"
whiteread = "=0.5.0"
rustc-hash = "=1.1.0"
smallvec = "=1.2.0"

[dev-dependencies]
Empty file.
14 changes: 14 additions & 0 deletions atcoder/abc/abc201-300/abc259/b.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void){
int a, b, c;
scanf("%d %d %d", &a, &b, &c);

double x, y;
x = a * cos(c * M_PI / 180.0) - b * sin(c * M_PI / 180.0);
y = a * sin(c * M_PI / 180.0) + b * cos(c * M_PI / 180.0);

printf("%f %f\n", x, y);
}
34 changes: 34 additions & 0 deletions atcoder/abc/abc201-300/abc259/c.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from collections import deque
s = list(input())
t = list(input())

s = deque(s)
t = deque(t)
flag = True
while len(t) > 0:
# tの文字が連続する限り取り出す
t_head = t.popleft()
count_t = [t_head, 1]
while len(t) > 0 and t[0] == count_t[0]:
t.popleft()
count_t[1] += 1

# sの文字がt_headに一致する限り取り出す
count_s = 0
while len(s) > 0 and s[0] == t_head:
s.popleft()
count_s += 1

if count_s == 0:
flag = False
break
elif count_s == 1 and count_t[1] > 1:
flag = False
break
elif count_s > count_t[1]:
flag = False
break
if flag:
print("Yes")
else:
print("No")
24 changes: 24 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/a.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use proconio::input;

fn main() {
input! {
n: i32,
m: i32,
x: i32,
t: i32,
d: i32,
}

let mut ans = t - (x * d);

for i in 1..=n {
if i > m {
break;
}
ans += d;
if i == x {
break;
}
}
println!("{}", ans);
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/b.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/c.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/d.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/e.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/ex.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/f.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
3 changes: 3 additions & 0 deletions atcoder/abc/abc201-300/abc259/src/bin/g.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
todo!();
}
27 changes: 27 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
type: Batch
timelimit: 2s
match: Lines

cases:
- name: sample1
in: |
38 20 17 168 3
out: |
168
- name: sample2
in: |
1 0 1 3 2
out: |
1
- name: sample3
in: |
100 10 100 180 1
out: |
90
extend:
- type: Text
path: "./a"
in: /in/*.txt
out: /out/*.txt
40 changes: 40 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/b.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
type: Batch
timelimit: 2s
match:
Float:
relative_error: 1e-6
absolute_error: 1e-6

cases:
- name: sample1
in: |
2 2 180
out: |
-2 -2
- name: sample2
in: |
5 0 120
out: |
-2.49999999999999911182 4.33012701892219364908
- name: sample3
in: |
0 0 11
out: |
0.00000000000000000000 0.00000000000000000000
- name: sample4
in: |
15 5 360
out: |
15.00000000000000177636 4.99999999999999555911
- name: sample5
in: |
-505 191 278
out: |
118.85878514480690171240 526.66743699786547949770
extend:
- type: Text
path: "./b"
in: /in/*.txt
out: /out/*.txt
24 changes: 24 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
type: Batch
timelimit: 2s
match: Lines

cases:
- name: sample1
in: |
abbaac
abbbbaaac
out: |
Yes
- name: sample2
in: |
xyzz
xyyzz
out: |
No
extend:
- type: Text
path: "./c"
in: /in/*.txt
out: /out/*.txt
31 changes: 31 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/d.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
type: Batch
timelimit: 2s
match: Lines

cases:
- name: sample1
in: |
4
0 -2 3 3
0 0 2
2 0 2
2 3 1
-3 3 3
out: |
Yes
- name: sample2
in: |
3
0 1 0 3
0 0 1
0 0 2
0 0 3
out: |
No
extend:
- type: Text
path: "./d"
in: /in/*.txt
out: /out/*.txt
34 changes: 34 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
type: Batch
timelimit: 2s
match: Lines

cases:
- name: sample1
in: |
4
1
7 2
2
2 2
5 1
1
5 1
2
2 1
7 1
out: |
3
- name: sample2
in: |
1
1
998244353 1000000000
out: |
1
extend:
- type: Text
path: "./e"
in: /in/*.txt
out: /out/*.txt
19 changes: 19 additions & 0 deletions atcoder/abc/abc201-300/abc259/testcases/ex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
type: Batch
timelimit: 2s
match: Lines

cases:
- name: sample1
in: |
2
1 3
3 1
out: |
6
extend:
- type: Text
path: "./ex"
in: /in/*.txt
out: /out/*.txt
Loading

0 comments on commit 4963a23

Please sign in to comment.