Submission #3598500
Source Code Expand
#include <iostream> #include <vector> #include <string> #include <cmath> #include <set> #include <algorithm> #include <array> #include <complex> #include <string> #include <utility> #include <map> #include <queue> #include <list> #include <functional> int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; const int INF = 1 << 21; using pii = std::pair<int, int>; #define SORT(v) std::sort(v.begin(), v.end()) int main(void) { int N, K; int a; std::cin >> N >> K; for (int i = 0; i < N; ++i) { std::cin >> a; } std::cout << (N + K - 3) / (K - 1) << std::endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Minimization |
User | kz_0420 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 609 Byte |
Status | AC |
Exec Time | 36 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 16 ms | 256 KB |
10.txt | AC | 28 ms | 256 KB |
2.txt | AC | 36 ms | 256 KB |
3.txt | AC | 20 ms | 256 KB |
4.txt | AC | 34 ms | 256 KB |
5.txt | AC | 36 ms | 256 KB |
6.txt | AC | 36 ms | 256 KB |
7.txt | AC | 3 ms | 256 KB |
8.txt | AC | 31 ms | 256 KB |
9.txt | AC | 1 ms | 256 KB |
sample1.txt | AC | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |
sample3.txt | AC | 1 ms | 256 KB |