Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions atcoder/ABC/TLE/abc230_c/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions atcoder/ABC/TLE/abc230_c/.idea/libraries/KotlinJavaRuntime.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/TLE/abc230_c/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions atcoder/ABC/TLE/abc230_c/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/TLE/abc230_c/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions atcoder/ABC/TLE/abc230_c/abc230_c.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
Binary file not shown.
60 changes: 60 additions & 0 deletions atcoder/ABC/TLE/abc230_c/src/main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import java.io.PrintWriter
import java.util.PriorityQueue
import kotlin.math.max
import kotlin.math.min

fun next() = readLine()!!
fun nextLongList() = next().split(" ").map{ it.toLong() }

@JvmField val _writer = PrintWriter(System.out, false)
fun main() { _writer.solve(); _writer.flush() }
fun PrintWriter.solve() {
val (n, a, b) = nextLongList()

val (p, q, r, s) = nextLongList()

val que = PriorityQueue<Pair<Long, Long>>() {i1 : Pair<Long, Long>, i2 : Pair<Long, Long> ->
return@PriorityQueue if (i1.first == i2.first) {
(i1.second - i2.second).toInt()
}
else {
(i1.first - i2.first).toInt()
}
}

var fmin = max(1 - a, 1 - b)
var fmax = min(n - a, n - b)

val set = mutableSetOf<Pair<Long, Long>>()
for (k in fmin..fmax) {
set.add(a + k to b + k)
}

val smin = max(1 - a, b - n)
val smax = min(n - a, b - 1)

for (k in smin..smax) {
set.add(a + k to b - k)
}

for (i in set) {
if (i.first in p..q &&
i.second in r..s) {
que.add(i)
}
}

var tmp = que.poll()
for (i in p..q) {
for (j in r..s) {
if (tmp != null && i == tmp.first && j == tmp.second) {
print('#')
tmp = que.poll()
}
else {
print('.')
}
}
println()
}
}
3 changes: 3 additions & 0 deletions atcoder/ABC/TLE/abc230_e/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions atcoder/ABC/TLE/abc230_e/.idea/libraries/KotlinJavaRuntime.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/TLE/abc230_e/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions atcoder/ABC/TLE/abc230_e/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/TLE/abc230_e/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions atcoder/ABC/TLE/abc230_e/abc230_e.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
Binary file not shown.
23 changes: 23 additions & 0 deletions atcoder/ABC/TLE/abc230_e/src/main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import java.io.PrintWriter
fun next() = readLine()!!
fun nextLong() = next().toLong()

@JvmField val _writer = PrintWriter(System.out, false)
fun main() { _writer.solve(); _writer.flush() }
fun PrintWriter.solve() {
val n = nextLong()

var sum = 0L
for (i in 1..n) {
val tmp = n / i
if (tmp != 1L) {
sum += tmp
}
else {
sum += (n - i + 1)
break
}
}

println(sum)
}
Empty file.
15 changes: 15 additions & 0 deletions atcoder/ABC/abc230_a/.idea/libraries/KotlinJavaRuntime.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/abc230_a/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions atcoder/ABC/abc230_a/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/abc230_a/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions atcoder/ABC/abc230_a/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions atcoder/ABC/abc230_a/abc230_a.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
Binary file not shown.
11 changes: 11 additions & 0 deletions atcoder/ABC/abc230_a/src/main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import java.io.PrintWriter
fun next() = readLine()!!
fun nextInt() = next().toInt()

@JvmField val _writer = PrintWriter(System.out, false)
fun main() { _writer.solve(); _writer.flush() }
fun PrintWriter.solve() {
val n = nextInt()

println(if (n >= 42) "AGC" + "%03d".format(n + 1) else "AGC" + "%03d".format(n))
}
3 changes: 3 additions & 0 deletions atcoder/ABC/abc230_b/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions atcoder/ABC/abc230_b/.idea/libraries/KotlinJavaRuntime.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/abc230_b/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions atcoder/ABC/abc230_b/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions atcoder/ABC/abc230_b/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions atcoder/ABC/abc230_b/abc230_b.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
Binary file not shown.
Loading