/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'void solve()':
foo.cc:13:17: error: 'n' was not declared in this scope
   13 |   for(int i=0;i<n;i++){
      |                 ^

Code

#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

#define speedBoost ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int

void solve(){
  ll a;
  cin>>a;
  for(int i=0;i<n;i++){
	  cout<<"I love programming\n";
  }
}

int main(){
  speedBoost;
  //int tc;
  //cin>>tc;
  //while(tc--){
    solve(); 
 // }
}

Information

Submit By
Type
Submission
Problem
P1018 Show your dedication
Language
C++17 (G++ 13.2.0)
Submit At
2025-04-23 11:32:03
Judged At
2025-04-23 11:32:03
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes