File tree Expand file tree Collapse file tree 20 files changed +445
-0
lines changed
atcoder/abc/abc201-300/abc259 Expand file tree Collapse file tree 20 files changed +445
-0
lines changed Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " abc259"
3
+ version = " 0.1.0"
4
+ edition = " 2018"
5
+
6
+ [package .metadata .cargo-compete .bin ]
7
+ abc259-a = { alias = " a" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_a" }
8
+ abc259-b = { alias = " b" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_b" }
9
+ abc259-c = { alias = " c" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_c" }
10
+ abc259-d = { alias = " d" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_d" }
11
+ abc259-e = { alias = " e" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_e" }
12
+ abc259-ex = { alias = " ex" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_h" }
13
+ abc259-f = { alias = " f" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_f" }
14
+ abc259-g = { alias = " g" , problem = " https://atcoder.jp/contests/abc259/tasks/abc259_g" }
15
+
16
+ [[bin ]]
17
+ name = " abc259-a"
18
+ path = " src/bin/a.rs"
19
+
20
+ [[bin ]]
21
+ name = " abc259-b"
22
+ path = " src/bin/b.rs"
23
+
24
+ [[bin ]]
25
+ name = " abc259-c"
26
+ path = " src/bin/c.rs"
27
+
28
+ [[bin ]]
29
+ name = " abc259-d"
30
+ path = " src/bin/d.rs"
31
+
32
+ [[bin ]]
33
+ name = " abc259-e"
34
+ path = " src/bin/e.rs"
35
+
36
+ [[bin ]]
37
+ name = " abc259-ex"
38
+ path = " src/bin/ex.rs"
39
+
40
+ [[bin ]]
41
+ name = " abc259-f"
42
+ path = " src/bin/f.rs"
43
+
44
+ [[bin ]]
45
+ name = " abc259-g"
46
+ path = " src/bin/g.rs"
47
+
48
+ [dependencies ]
49
+ num = " =0.2.1"
50
+ num-bigint = " =0.2.6"
51
+ num-complex = " =0.2.4"
52
+ num-integer = " =0.1.42"
53
+ num-iter = " =0.1.40"
54
+ num-rational = " =0.2.4"
55
+ num-traits = " =0.2.11"
56
+ num-derive = " =0.3.0"
57
+ ndarray = " =0.13.0"
58
+ nalgebra = " =0.20.0"
59
+ alga = " =0.9.3"
60
+ libm = " =0.2.1"
61
+ rand = { version = " =0.7.3" , features = [" small_rng" ] }
62
+ getrandom = " =0.1.14"
63
+ rand_chacha = " =0.2.2"
64
+ rand_core = " =0.5.1"
65
+ rand_hc = " =0.2.0"
66
+ rand_pcg = " =0.2.1"
67
+ rand_distr = " =0.2.2"
68
+ petgraph = " =0.5.0"
69
+ indexmap = " =1.3.2"
70
+ regex = " =1.3.6"
71
+ lazy_static = " =1.4.0"
72
+ ordered-float = " =1.0.2"
73
+ ascii = " =1.0.0"
74
+ permutohedron = " =0.2.4"
75
+ superslice = " =1.0.0"
76
+ itertools = " =0.9.0"
77
+ itertools-num = " =0.1.3"
78
+ maplit = " =1.0.2"
79
+ either = " =1.5.3"
80
+ im-rc = " =14.3.0"
81
+ fixedbitset = " =0.2.0"
82
+ bitset-fixed = " =0.1.0"
83
+ proconio = { version = " =0.3.6" , features = [" derive" ] }
84
+ text_io = " =0.1.8"
85
+ whiteread = " =0.5.0"
86
+ rustc-hash = " =1.1.0"
87
+ smallvec = " =1.2.0"
88
+
89
+ [dev-dependencies ]
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+ #include <math.h>
4
+
5
+ int main (void ){
6
+ int a , b , c ;
7
+ scanf ("%d %d %d" , & a , & b , & c );
8
+
9
+ double x , y ;
10
+ x = a * cos (c * M_PI / 180.0 ) - b * sin (c * M_PI / 180.0 );
11
+ y = a * sin (c * M_PI / 180.0 ) + b * cos (c * M_PI / 180.0 );
12
+
13
+ printf ("%f %f\n" , x , y );
14
+ }
Original file line number Diff line number Diff line change
1
+ from collections import deque
2
+ s = list (input ())
3
+ t = list (input ())
4
+
5
+ s = deque (s )
6
+ t = deque (t )
7
+ flag = True
8
+ while len (t ) > 0 :
9
+ # tの文字が連続する限り取り出す
10
+ t_head = t .popleft ()
11
+ count_t = [t_head , 1 ]
12
+ while len (t ) > 0 and t [0 ] == count_t [0 ]:
13
+ t .popleft ()
14
+ count_t [1 ] += 1
15
+
16
+ # sの文字がt_headに一致する限り取り出す
17
+ count_s = 0
18
+ while len (s ) > 0 and s [0 ] == t_head :
19
+ s .popleft ()
20
+ count_s += 1
21
+
22
+ if count_s == 0 :
23
+ flag = False
24
+ break
25
+ elif count_s == 1 and count_t [1 ] > 1 :
26
+ flag = False
27
+ break
28
+ elif count_s > count_t [1 ]:
29
+ flag = False
30
+ break
31
+ if flag :
32
+ print ("Yes" )
33
+ else :
34
+ print ("No" )
Original file line number Diff line number Diff line change
1
+ use proconio:: input;
2
+
3
+ fn main ( ) {
4
+ input ! {
5
+ n: i32 ,
6
+ m: i32 ,
7
+ x: i32 ,
8
+ t: i32 ,
9
+ d: i32 ,
10
+ }
11
+
12
+ let mut ans = t - ( x * d) ;
13
+
14
+ for i in 1 ..=n {
15
+ if i > m {
16
+ break ;
17
+ }
18
+ ans += d;
19
+ if i == x {
20
+ break ;
21
+ }
22
+ }
23
+ println ! ( "{}" , ans) ;
24
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ todo ! ( ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match : Lines
5
+
6
+ cases :
7
+ - name : sample1
8
+ in : |
9
+ 38 20 17 168 3
10
+ out : |
11
+ 168
12
+ - name : sample2
13
+ in : |
14
+ 1 0 1 3 2
15
+ out : |
16
+ 1
17
+ - name : sample3
18
+ in : |
19
+ 100 10 100 180 1
20
+ out : |
21
+ 90
22
+
23
+ extend :
24
+ - type : Text
25
+ path : " ./a"
26
+ in : /in/*.txt
27
+ out : /out/*.txt
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match :
5
+ Float :
6
+ relative_error : 1e-6
7
+ absolute_error : 1e-6
8
+
9
+ cases :
10
+ - name : sample1
11
+ in : |
12
+ 2 2 180
13
+ out : |
14
+ -2 -2
15
+ - name : sample2
16
+ in : |
17
+ 5 0 120
18
+ out : |
19
+ -2.49999999999999911182 4.33012701892219364908
20
+ - name : sample3
21
+ in : |
22
+ 0 0 11
23
+ out : |
24
+ 0.00000000000000000000 0.00000000000000000000
25
+ - name : sample4
26
+ in : |
27
+ 15 5 360
28
+ out : |
29
+ 15.00000000000000177636 4.99999999999999555911
30
+ - name : sample5
31
+ in : |
32
+ -505 191 278
33
+ out : |
34
+ 118.85878514480690171240 526.66743699786547949770
35
+
36
+ extend :
37
+ - type : Text
38
+ path : " ./b"
39
+ in : /in/*.txt
40
+ out : /out/*.txt
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match : Lines
5
+
6
+ cases :
7
+ - name : sample1
8
+ in : |
9
+ abbaac
10
+ abbbbaaac
11
+ out : |
12
+ Yes
13
+ - name : sample2
14
+ in : |
15
+ xyzz
16
+ xyyzz
17
+ out : |
18
+ No
19
+
20
+ extend :
21
+ - type : Text
22
+ path : " ./c"
23
+ in : /in/*.txt
24
+ out : /out/*.txt
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match : Lines
5
+
6
+ cases :
7
+ - name : sample1
8
+ in : |
9
+ 4
10
+ 0 -2 3 3
11
+ 0 0 2
12
+ 2 0 2
13
+ 2 3 1
14
+ -3 3 3
15
+ out : |
16
+ Yes
17
+ - name : sample2
18
+ in : |
19
+ 3
20
+ 0 1 0 3
21
+ 0 0 1
22
+ 0 0 2
23
+ 0 0 3
24
+ out : |
25
+ No
26
+
27
+ extend :
28
+ - type : Text
29
+ path : " ./d"
30
+ in : /in/*.txt
31
+ out : /out/*.txt
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match : Lines
5
+
6
+ cases :
7
+ - name : sample1
8
+ in : |
9
+ 4
10
+ 1
11
+ 7 2
12
+ 2
13
+ 2 2
14
+ 5 1
15
+ 1
16
+ 5 1
17
+ 2
18
+ 2 1
19
+ 7 1
20
+ out : |
21
+ 3
22
+ - name : sample2
23
+ in : |
24
+ 1
25
+ 1
26
+ 998244353 1000000000
27
+ out : |
28
+ 1
29
+
30
+ extend :
31
+ - type : Text
32
+ path : " ./e"
33
+ in : /in/*.txt
34
+ out : /out/*.txt
Original file line number Diff line number Diff line change
1
+ ---
2
+ type : Batch
3
+ timelimit : 2s
4
+ match : Lines
5
+
6
+ cases :
7
+ - name : sample1
8
+ in : |
9
+ 2
10
+ 1 3
11
+ 3 1
12
+ out : |
13
+ 6
14
+
15
+ extend :
16
+ - type : Text
17
+ path : " ./ex"
18
+ in : /in/*.txt
19
+ out : /out/*.txt
You can’t perform that action at this time.
0 commit comments