fork(1) download
  1. #include <iostream>
  2. #define max 1000000007
  3. using namespace std;
  4. int a[max-6];
  5.  
  6. void schemes() {
  7. a[1]=0;a[2]=12;
  8. for(int i=3;i<=(max-7);++i) a[i]=2*a[i-1]+3*a[i-2];
  9. return;
  10. }
  11.  
  12. int main() {
  13. ios::sync_with_stdin(false);
  14. int t,n;
  15. cin>>t;
  16. while(t--) {
  17. cin>>n;
  18. cout<<a[n]<<endl;
  19. }
  20. return 0;
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3
2
3
5
compilation info
prog.cpp:4:12: error: size of array ‘a’ is too large
 int a[max-6];
            ^
prog.cpp: In function ‘void schemes()’:
prog.cpp:7:2: error: ‘a’ was not declared in this scope
  a[1]=0;a[2]=12;
  ^
prog.cpp: In function ‘int main()’:
prog.cpp:13:2: error: ‘sync_with_stdin’ is not a member of ‘std::ios {aka std::basic_ios<char>}’
  ios::sync_with_stdin(false);
  ^
prog.cpp:18:9: error: ‘a’ was not declared in this scope
   cout<<a[n]<<endl;
         ^
stdout
Standard output is empty