# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9396 |
2014-09-28T06:06:57 Z |
effserv |
Wiring (kriii2_W) |
C++ |
|
140 ms |
16836 KB |
/* 문제
*/
// 2014.
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <functional>
#include <cstring>
#include <string>
#include <map>
using namespace std;
long long Q[2000000];
map <long long, bool> M;
int main()
{
long long n;
scanf("%lld", &n);
Q[0] = 0;
for (int i = 1; i < 2000000; i++)
{
Q[i] = (Q[i - 1] + (long long)i)%n;
M[Q[i]] = true;
}
int ans = 0;
for (map<long long , bool> :: iterator it = M.begin(); it != M.end(); it++)
{
if (M[it -> first] == true)
ans++;
}
printf("%d\n", ans - 1);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
140 ms |
16836 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |