Detalii evaluare #58154356

Rezumat problemă

twoop

#1835
Se dă un șir de N elemente, numere întregi. Pe acest șir se aplică operații de două tipuri :
  • Tip 1: st dr val – elementele de pe pozițiile din intervalul [st, dr] cresc cu valoarea val
  • Tip 2: poz – să se afișeze valoarea elementului de pe poziția poz .
    Dându-se șirul de elemente și operațiile, aplicați operațiile pe șir.

Detalii

Problema twoop Operații I/O twoop.in/twoop.out
Limita timp 0.4 secunde Limita memorie Total: 16 MB / Stivă 8 MB
Id soluție #58154356 Utilizator Prodan Octavian (octav_info)
Fișier twoop.cpp Dimensiune 1.70 KB
Data încărcării 16 Mai 2025, 20:43 Scor / rezultat Eroare de compilare

Evaluare

Mesaj compilare

twoop.cpp:21:22: error: stray '#' in program
 ll v[100005], smen[10#include <iostream>

                      ^
twoop.cpp:21:23: error: expected ']' before 'include'
 ll v[100005], smen[10#include <iostream>

                       ^
twoop.cpp:37:13: error: redefinition of 'std::ifstream fin'
 ifstream fin("twoop.in");

             ^
twoop.cpp:17:10: error: 'std::ifstream fin' previously declared here
 ifstream fin("twoop.in");

          ^
twoop.cpp:38:14: error: redefinition of 'std::ofstream fout'
 ofstream fout("twoop.out");

              ^
twoop.cpp:18:10: error: 'std::ofstream fout' previously declared here
 ofstream fout("twoop.out");

          ^
twoop.cpp:40:4: error: redefinition of 'long long int n'
 ll n, type1, type2, l, r, val, x;

    ^
twoop.cpp:20:4: error: 'long long int n' previously declared here
 ll n, type1, type2, l, r, val, x;

    ^
twoop.cpp:40:7: error: redefinition of 'long long int type1'
 ll n, type1, type2, l, r, val, x;

       ^
twoop.cpp:20:7: error: 'long long int type1' previously declared here
 ll n, type1, type2, l, r, val, x;

       ^
twoop.cpp:40:14: error: redefinition of 'long long int type2'
 ll n, type1, type2, l, r, val, x;

              ^
twoop.cpp:20:14: error: 'long long int type2' previously declared here
 ll n, type1, type2, l, r, val, x;

              ^
twoop.cpp:40:21: error: redefinition of 'long long int l'
 ll n, type1, type2, l, r, val, x;

                     ^
twoop.cpp:20:21: error: 'long long int l' previously declared here
 ll n, type1, type2, l, r, val, x;

                     ^
twoop.cpp:40:24: error: redefinition of 'long long int r'
 ll n, type1, type2, l, r, val, x;

                        ^
twoop.cpp:20:24: error: 'long long int r' previously declared here
 ll n, type1, type2, l, r, val, x;

                        ^
twoop.cpp:40:27: error: redefinition of 'long long int val'
 ll n, type1, type2, l, r, val, x;

                           ^
twoop.cpp:20:27: error: 'long long int val' previously declared here
 ll n, type1, type2, l, r, val, x;

                           ^
twoop.cpp:40:32: error: redefinition of 'long long int x'
 ll n, type1, type2, l, r, val, x;

                                ^
twoop.cpp:20:32: error: 'long long int x' previously declared here
 ll n, type1, type2, l, r, val, x;

                                ^
twoop.cpp:41:12: error: redefinition of 'long long int v [100005]'
 ll v[100005], smen[100005];

            ^
twoop.cpp:21:4: error: 'long long int v [100005]' previously declared here
 ll v[100005], smen[10#include <iostream>

    ^
twoop.cpp:73:2: error: expected unqualified-id before numeric constant
 }0005];

  ^
twoop.cpp: In function 'int main()':
twoop.cpp:75:8: error: redefinition of 'int main()'
 signed main()

        ^
twoop.cpp:43:8: error: 'int main()' previously defined here
 signed main()

        ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema twoop face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.

Du-te sus!