9292022-01-29 13:48:51JMMirkoHús sütés (75 pont)cpp11Forditási hiba
PK
~ÿ†múmain.cpp#include <bits/stdc++.h>
using namespace std;
int main() 
{

    int n, m=0;
    cin >> n;
        vector <int> v(n);
    for(int i=0;i<n;i++){
        cin >> v[i];

    }
    sort(v.rbegin(), v.rend());
    for(int i=0;i<n;i++){
        if(i+v[i]>m)m=i+v[i];
    }
    cout << m;
}
PK
~ÿ†múmain.cppPK6A
Forditási hiba
exit status 1main.cpp:1:3: error: stray ‘\3’ in program
    1 | PK
      |   ^
main.cpp:1:4: error: stray ‘\4’ in program
    1 | PK
      |    ^
main.cpp:2:1: warning: null character(s) ignored
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      | ^
main.cpp:2:9: error: stray ‘\377’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |         ^
main.cpp:2:10: error: stray ‘\206’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |          ^
main.cpp:2:12: error: stray ‘\372’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |            ^
main.cpp:2:13: error: stray ‘\25’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |             ^
main.cpp:2:14: error: stray ‘\33’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |              ^
main.cpp:2:15: error: stray ‘\1’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |               ^
main.cpp:2:16: warning: null character(s) ignored
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                ^
main.cpp:2:18: error: stray ‘\33’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                  ^
main.cpp:2:19: error: stray ‘\1’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                   ^
main.cpp:2:20: warning: null character(s) ignored
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                    ^
main.cpp:2:22: error: stray ‘\10’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                      ^
main.cpp:2:23: warning: null character(s) ignored
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                       ^
main.cpp:2:34: error: stray ‘#’ in program
    2 |        ~��m�       main.cpp#include <bits/stdc++.h>
      |                                  ^
main.cpp:20:3: error: stray ‘\1’ in program
   20 | PK 
      |   ^
main.cpp:20:4: error: stray ‘\2’ in program
   20 | PK 
      |    ^
main.cpp:20:5: error: stray ‘\24’ in program
   20 | PK 
      |     ^
main.cpp:20:6: warning: null character(s) ignored
   20 | PK 
      |      ^
main.cpp:21:1: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      | ^
main.cpp:21:9: error: stray ‘\377’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |         ^
main.cpp:21:10: error: stray ‘\206’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |          ^
main.cpp:21:12: error: stray ‘\372’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |            ^
main.cpp:21:13: error: stray ‘\25’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |             ^
main.cpp:21:14: error: stray ‘\33’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |              ^
main.cpp:21:15: error: stray ‘\1’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |               ^
main.cpp:21:16: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                ^
main.cpp:21:18: error: stray ‘\33’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                  ^
main.cpp:21:19: error: stray ‘\1’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                   ^
main.cpp:21:20: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                    ^
main.cpp:21:22: error: stray ‘\10’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                      ^
main.cpp:21:23: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                       ^
main.cpp:21:50: error: stray ‘\5’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                  ^
main.cpp:21:51: error: stray ‘\6’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                   ^
main.cpp:21:52: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                    ^
main.cpp:21:56: error: stray ‘\1’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                        ^
main.cpp:21:57: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                         ^
main.cpp:21:58: error: stray ‘\1’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                          ^
main.cpp:21:59: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                           ^
main.cpp:21:61: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                             ^
main.cpp:21:65: error: stray ‘\1’ in program
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                                 ^
main.cpp:21:66: warning: null character(s) ignored
   21 |        ~��m�                     main.cppPK      6   A    
      |                                                                  ^
main.cpp:1:1: error: ‘PK’ does not name a type
    1 | PK
      | ^~
main.cpp: In function ‘int main()’:
main.cpp:8:5: error: ‘cin’ was not declared in this scope
    8 |     cin >> n;
      |     ^~~
main.cpp:9:9: error: ‘vector’ was not declared in this scope
    9 |         vector <int> v(n);
      |         ^~~~~~
main.cpp:9:17: error: expected primary-expression before ‘int’
    9 |         vector <int> v(n);
      |                 ^~~
main.cpp:11:16: error: ‘v’ was not declared in this scope
   11 |         cin >> v[i];
      |                ^
main.cpp:14:10: error: ‘v’ was not declared in this scope
   14 |     sort(v.rbegin(), v.rend());
      |          ^
main.cpp:14:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
   14 |     sort(v.rbegin(), v.rend());
      |     ^~~~
      |     short
main.cpp:18:5: error: ‘cout’ was not declared in this scope
   18 |     cout << m;
      |     ^~~~
main.cpp: At global scope:
main.cpp:20:1: error: ‘PK’ does not name a type
   20 | PK 
      | ^~
Exited with error status 1