# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
98519 |
2019-02-23T20:18:44 Z |
pamaj |
Zoltan (COCI16_zoltan) |
C++14 |
|
537 ms |
23604 KB |
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int mod = 1e9 + 7;
int v[200010];
int n;
map<int, int> mp;
set<int> st;
int exp(int x, int y, int p)
{
int res = 1;
x = x % p;
while (y > 0)
{
if (y & 1)
res = (res*x) % p;
y = y>>1;
x = (x*x) % p;
}
return res;
}
int32_t main()
{
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> v[i];
mp[v[i]]++;
st.insert(v[i]);
}
long long ans = 1;
for(auto u : st)
{
if(mp[u] == 1) continue;
ans *= exp(2, mp[u], mod);
ans %= mod;
}
cout << st.size() << " " << ans << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
4 |
Correct |
2 ms |
256 KB |
Output is correct |
5 |
Correct |
2 ms |
256 KB |
Output is correct |
6 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
7 |
Incorrect |
3 ms |
484 KB |
Output isn't correct |
8 |
Incorrect |
3 ms |
512 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
10 |
Incorrect |
3 ms |
512 KB |
Output isn't correct |
11 |
Incorrect |
317 ms |
18968 KB |
Output isn't correct |
12 |
Incorrect |
303 ms |
16376 KB |
Output isn't correct |
13 |
Incorrect |
230 ms |
15608 KB |
Output isn't correct |
14 |
Incorrect |
354 ms |
16528 KB |
Output isn't correct |
15 |
Incorrect |
478 ms |
20600 KB |
Output isn't correct |
16 |
Incorrect |
537 ms |
23604 KB |
Output isn't correct |
17 |
Incorrect |
259 ms |
20344 KB |
Output isn't correct |
18 |
Incorrect |
289 ms |
20216 KB |
Output isn't correct |
19 |
Incorrect |
297 ms |
20260 KB |
Output isn't correct |
20 |
Incorrect |
306 ms |
20344 KB |
Output isn't correct |