# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068738 | 2024-08-21T11:45:10 Z | cpdreamer | Fibonacci representations (CEOI18_fib) | C++17 | 1 ms | 348 KB |
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <utility> #define V vector #define F first #define S second #define P pair #define pb push_back #define all(v) v.begin(),v.end() typedef long long ll; using namespace __gnu_pbds; using namespace std; typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; static int called = 0;const long long MOD = 1e9+7; // 1e9 + 7 void file(){ freopen("input.txt.txt","r",stdin); freopen("output.txt.txt","w",stdout); } ll binary_expo(ll a,ll b,ll m){ ll res=1; while(b){ if(b%2==1){res=(res*a)%m;b--;} b/=2; a=(a*a)%m; } return res%m; } set<map<int,int>>st1; set<map<int,int>>st; bool prime(ll p){ for(int i=0;i<500;i++) { ll b = rand()%p; if(b!=0) { ll res = binary_expo(b, p, p); if (res != b % p) return false; } } return true; } void solve() { int n; cin>>n; int A[n]; for(int i=0;i<n;i++) cin>>A[i]; int c=0; for(int i=0;i<n;i++){ if(A[i]!=1) c++; cout<<binary_expo(2,c,MOD)<<endl; } } int main(){ //file(); solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |