art.cpp:3:1: error: expected unqualified-id before '/' token
/dit me oj.uz
^
art.cpp: In function 'int main()':
art.cpp:7:48: error: 'n' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^
art.cpp:7:139: error: 'tmp' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
art.cpp:7:139: note: suggested alternative: 'tm'
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
tm
art.cpp:7:162: error: 'sum' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
art.cpp:7:184: error: 'ans' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
art.cpp:7:184: note: suggested alternative: 'abs'
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
abs
art.cpp:7:223: error: 'ans' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
art.cpp:7:223: note: suggested alternative: 'abs'
ios_base::sync_with_stdio(0); cin.tie(0);cin>>n;for(int i=1;i<=n;i++) cin>>a[i].first>>a[i].second;sort(a+1,a+n+1);for(int i=1;i<=n;i++){tmp=max(tmp,a[i].first-sum);sum+=a[i].second;ans=max(ans,sum-a[i].first+tmp);}cout<<ans;
^~~
abs