Search is not available for this dataset
question_title
stringlengths
1
66
question_content
stringlengths
146
2.19k
platform
stringclasses
3 values
question_id
stringlengths
4
8
contest_id
stringlengths
4
20
contest_date
timestamp[s]
starter_code
stringlengths
0
118
difficulty
stringclasses
3 values
public_test_cases
stringlengths
82
676
private_test_cases
stringlengths
140
92M
metadata
stringlengths
2
49
A. Short Sort
มีการ์ดสามใบที่มีตัวอักษร $\texttt{a}$, $\texttt{b}$, $\texttt{c}$ วางเรียงกันในบางลำดับ คุณสามารถทำการดำเนินการต่อไปนี้ได้สูงสุดหนึ่งครั้ง: - เลือกการ์ดสองใบ และสลับที่กัน เป็นไปได้หรือไม่ที่แถวจะกลายเป็น $\texttt{abc}$ หลังจากการดำเนินการ? ให้แสดงผล "YES" ถ้าเป็นไปได้ และ "NO" ถ้าไม่เป็นไปได้ ข้อมูลนำเข้า บรรทัดแรกประกอบด้วยจำนวนเต็ม $t$ ($1 \leq t \leq 6$) — จำนวนกรณีทดสอบ บรรทัดเดียวของแต่ละกรณีทดสอบประกอบด้วยสตริงเดียวที่ประกอบด้วยตัวอักษรสามตัว $\texttt{a}$, $\texttt{b}$, และ $\texttt{c}$ อย่างละหนึ่งครั้ง ซึ่งแทนการ์ด ข้อมูลส่งออก สำหรับแต่ละกรณีทดสอบ ให้แสดงผล "YES" ถ้าคุณสามารถทำให้แถวเป็น $\texttt{abc}$ ด้วยการดำเนินการสูงสุดหนึ่งครั้ง หรือ "NO" ถ้าไม่สามารถทำได้ คุณสามารถแสดงผลคำตอบในรูปแบบใดก็ได้ (เช่น สตริง "yEs", "yes", "Yes" และ "YES" จะถูกยอมรับว่าเป็นคำตอบที่ถูกต้อง)
codeforces
1873_A
1873
2023-08-21T00:00:00
easy
[{"input": "6\nabc\nacb\nbac\nbca\ncab\ncba\n", "output": "YES\nYES\nYES\nNO\nNO\nYES\n", "testtype": "stdin"}]
eJxrYJmaz8gABhEZQEZ0tVJmXkFpiZKVgpJhTF5iUnJMnpKOglJ+aQlUNNI1GCJUklpcUlJZkAoSLC5JycxTqtVRQNJuDNWOILAYhCCIMdI0Ji85MQloWjKQSE5KjMlLSgSam5SciG64nz+y2WACJESMJWYY7ibFG8T5KnaKHgAcinnp
{}
B. Good Kid
"```python\ndef max_product_with_increment(t, test_cases):\n results = []\n for case in test_c(...TRUNCATED)
codeforces
1873_B
1873
2023-08-21T00:00:00
easy
"[{\"input\": \"4\\n4\\n2 2 1 2\\n3\\n0 1 2\\n5\\n4 3 2 3 4\\n9\\n9 9 9 9 9 9 9 9 9\\n\", \"output\"(...TRUNCATED)
"eJyUvb2uNVvSlIuBi8UNDLWNUf9VgytB4jXBwOmDRGMcHR2JS2etingysnYbNGo1fL323HNWjZ/MyMzIyP/1b//T9u//3b/5z//(...TRUNCATED)
{}
D. 1D Eraser
"```\n// คุณมีแถบกระดาษ $s$ ที่มีความยาว $n$ เ(...TRUNCATED)
codeforces
1873_D
1873
2023-08-21T00:00:00
easy
"[{\"input\": \"8\\n6 3\\nWBWWWB\\n7 3\\nWWBWBWW\\n5 4\\nBWBWB\\n5 5\\nBBBBB\\n8 2\\nBWBWBBBB\\n10 2(...TRUNCATED)
"eJyUvb2SY8vWXSdDplz6O65No/APyMyXSEaoTNGgU2IELw0GgxF8Wb6HsAGsOcbKqi901adPFYCdP2vNOWZ2dRcK+J//+3/4d//(...TRUNCATED)
{}
C. Raspberries
"You are given an array of integers $a_1, a_2, \\ldots, a_n$ and a number $k$ ($2 \\leq k \\leq 5$).(...TRUNCATED)
codeforces
1883_C
1883
2023-09-22T00:00:00
medium
"[{\"input\": \"15\\n2 5\\n7 3\\n3 3\\n7 4 1\\n5 2\\n9 7 7 3 9\\n5 5\\n5 4 1 2 3\\n7 4\\n9 5 1 5 9 5(...TRUNCATED)
"eJyc3TuOLluWJGYKHAaFhZJbaH9ud46EAFNkC60kG+hqgSAIcDgcC0fFE7HXt81PtVIgCpl57zkR/+++H+thy8zq//4f/5f/9//(...TRUNCATED)
{}
A. Game with Integers
"```python\n# ฟังก์ชันนี้ใช้ในการตรวจสอบว่(...TRUNCATED)
codeforces
1899_A
1899
2023-10-17T00:00:00
easy
"[{\"input\": \"6\\n1\\n3\\n5\\n100\\n999\\n1000\\n\", \"output\": \"First\\nSecond\\nFirst\\nFirst\(...TRUNCATED)
"eJzt2cGOFFUUBmAXPgiZNTFTp+pUneMD+AJuTBxXwoJNY2RYGGPiQ+jWne/pfGdwYXC00YyS0ARqyB3+pum6/1f3Xn78+Odfn3w(...TRUNCATED)
{}
B. 250 Thousand Tons of TNT
"```\n// อินพุต\n// บรรทัดแรกประกอบด้วยจำน(...TRUNCATED)
codeforces
1899_B
1899
2023-10-17T00:00:00
hard
"[{\"input\": \"5\\n2\\n1 2\\n6\\n10 2 3 6 1 3\\n4\\n1000000000 1000000000 1000000000 1000000000\\n1(...TRUNCATED)
"eJyM/UuuLU2SLGayUQNZyPZtuLm5+aMGwDEQYDSLjdv5iwCTjQJBoCZZ8yn5xHYCRLKT9xFx4py91/KHmZqqqIjo//f/8T/99//(...TRUNCATED)
{}
C. Yarik and Array
"```\n// ส่วนย่อยของอาร์เรย์คือส่วนที่ต(...TRUNCATED)
codeforces
1899_C
1899
2023-10-17T00:00:00
hard
"[{\"input\": \"7\\n5\\n1 2 3 4 5\\n4\\n9 9 8 8\\n6\\n-1 4 -1 0 5 -4\\n4\\n-1 2 4 -3\\n1\\n-1000\\n3(...TRUNCATED)
"eJzEu02OLMuSpMcBF3LwBhxVAhn/Eb0SAnzDrkFNXhdQrwZEowHuk1vgIuiqHqdAVNcJ/T4xzyJwb5zMcDc1VRFRcXNzz//rf/3(...TRUNCATED)
{}
number-of-senior-citizens
"```python\ndef count_passengers_over_60(details):\n count = 0\n for detail in details:\n (...TRUNCATED)
leetcode
2727
biweekly-contest-104
2023-05-13T00:00:00
class Solution: def countSeniors(self, details: List[str]) -> int:
easy
"[{\"input\": \"[\\\"7868190130M7522\\\", \\\"5303914400F9211\\\", \\\"9273338290F4010\\\"]\", \"out(...TRUNCATED)
"eJylmcuqJMcRhr3wcwhxwDthMiIvkekHqF1RW4NGC2NkEIiRwGcWxhj8EPb7+vv7VGTLGmM4jARCU9NdmRnx3yL7n7/99++++s3(...TRUNCATED)
{"func_name": "countSeniors"}
sum-in-a-matrix
"```python\n# ฟังก์ชันนี้คำนวณคะแนนสุดท้าย(...TRUNCATED)
leetcode
2728
biweekly-contest-104
2023-05-13T00:00:00
class Solution: def matrixSum(self, nums: List[List[int]]) -> int:
medium
"[{\"input\": \"[[7, 2, 1], [6, 4, 2], [6, 5, 3], [3, 2, 1]]\", \"output\": \"15\", \"testtype\": \"(...TRUNCATED)
"eJzsvTuuNUuSpUeBA7lIqiGEh4fHo0dCIFFCo1ENFNDIKoCZQqPRAIfEgXEQPPatZXGyq6RUKC0hb97Hv/eO8IfZZ8vMzf/v//3(...TRUNCATED)
{"func_name": "matrixSum"}
maximum-or
"You are given a 0-indexed integer array nums of length n and an integer k. In an operation, you can(...TRUNCATED)
leetcode
2730
biweekly-contest-104
2023-05-13T00:00:00
class Solution: def maximumOr(self, nums: List[int], k: int) -> int:
medium
"[{\"input\": \"[12, 9]\\n1\", \"output\": \"30\", \"testtype\": \"functional\"}, {\"input\": \"[8, (...TRUNCATED)
"eJyUvUuqbduSZaeECvLw9E3M8R9DJRGElBAiBAHCI0DuiUAIVCtVRoWRtdbXecgDT7hDfM7bd++15hwf+3Tr1u3//u//x//n/23(...TRUNCATED)
{"func_name": "maximumOr"}

No dataset card yet

Downloads last month
2