Detalii evaluare #64803917

Rezumat problemă

#941

În preajma Crăciunului toţi suntem sau redevenim copii.

Scrie un program care afişează pe ecran o urare pentru cei dragi ţie!

Detalii

Problema Urare Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64803917 Utilizator notabotlmfao2 notabotlmfao2 (notabotlmfao2)
Fișier urare.cpp Dimensiune 32 B
Data încărcării 02 Iunie 2026, 13:05 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

In file included from urare.cpp:1:
/home/ssilviu/.bashrc:1:3: error: invalid preprocessing directive #~
    1 | # ~/.bashrc: executed by bash(1) for non-login shells.
      |   ^
/home/ssilviu/.bashrc:2:3: error: invalid preprocessing directive #see
    2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
      |   ^~~
/home/ssilviu/.bashrc:3:3: error: invalid preprocessing directive #for
    3 | # for examples
      |   ^~~
/home/ssilviu/.bashrc:5:3: error: invalid preprocessing directive #If; did you mean #if?
    5 | # If not running interactively, don't do anything
      |   ^~
      |   if
/home/ssilviu/.bashrc:5:36: warning: missing terminating ' character
    5 | # If not running interactively, don't do anything
      |                                    ^
/home/ssilviu/.bashrc:11:3: error: invalid preprocessing directive #don
   11 | # don't put duplicate lines or lines starting with space in the history.
      |   ^~~
/home/ssilviu/.bashrc:11:6: warning: missing terminating ' character
   11 | # don't put duplicate lines or lines starting with space in the history.
      |      ^
/home/ssilviu/.bashrc:12:3: error: invalid preprocessing directive #See
   12 | # See bash(1) for more options
      |   ^~~
/home/ssilviu/.bashrc:15:3: error: invalid preprocessing directive #append
   15 | # append to the history file, don't overwrite it
      |   ^~~~~~
/home/ssilviu/.bashrc:15:34: warning: missing terminating ' character
   15 | # append to the history file, don't overwrite it
      |                                  ^
/home/ssilviu/.bashrc:18:3: error: invalid preprocessing directive #for
   18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
      |   ^~~
/home/ssilviu/.bashrc:22:3: error: invalid preprocessing directive #check
   22 | # check the window size after each command and, if necessary,
      |   ^~~~~
/home/ssilviu/.bashrc:23:3: error: invalid preprocessing directive #update
   23 | # update the values of LINES and COLUMNS.
      |   ^~~~~~
/home/ssilviu/.bashrc:26:3: error: invalid preprocessing directive #If; did you mean #if?
   26 | # If set, the pattern "**" used in a pathname expansion context will
      |   ^~
      |   if
/home/ssilviu/.bashrc:27:3: error: invalid preprocessing directive #match
   27 | # match all files and zero or more directories and subdirectories.
      |   ^~~~~
/home/ssilviu/.bashrc:28:2: error: invalid preprocessing directive #shopt
   28 | #shopt -s globstar
      |  ^~~~~
/home/ssilviu/.bashrc:30:3: error: invalid preprocessing directive #make
   30 | # make less more friendly for non-text input files, see lesspipe(1)
      |   ^~~~
/home/ssilviu/.bashrc:33:3: error: invalid preprocessing directive #set
   33 | # set variable identifying the chroot you work in (used in the prompt below)
      |   ^~~
/home/ssilviu/.bashrc:38:3: error: invalid preprocessing directive #set
   38 | # set a fancy prompt (non-color, unless we know we "want" color)
      |   ^~~
/home/ssilviu/.bashrc:43:3: error: invalid preprocessing directive #uncomment
   43 | # uncomment for a colored prompt, if the terminal has the capability; turned
      |   ^~~~~~~~~
/home/ssilviu/.bashrc:44:3: error: invalid preprocessing directive #off
   44 | # off by default to not distract the user: the focus in a terminal window
      |   ^~~
/home/ssilviu/.bashrc:45:3: error: invalid preprocessing directive #should
   45 | # should be on the output of commands, not on the prompt
      |   ^~~~~~
/home/ssilviu/.bashrc:46:2: error: invalid preprocessing directive #force_color_prompt
   46 | #force_color_prompt=yes
      |  ^~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:50:11: error: invalid preprocessing directive #We
   50 |         # We have color support; assume it's compliant with Ecma-48
      |           ^~
/home/ssilviu/.bashrc:50:43: warning: missing terminating ' character
   50 |         # We have color support; assume it's compliant with Ecma-48
      |                                           ^
/home/ssilviu/.bashrc:51:11: error: invalid preprocessing directive #(
   51 |         # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
      |           ^
/home/ssilviu/.bashrc:52:11: error: invalid preprocessing directive #a
   52 |         # a case would tend to support setf rather than setaf.)
      |           ^
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\]'
   60 |     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:60:9: error: incomplete universal character name \u
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\h'
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\]'
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\]'
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\w'
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\]'
/home/ssilviu/.bashrc:60:9: warning: unknown escape sequence: '\$'
/home/ssilviu/.bashrc:60:9: warning: character constant too long for its type
/home/ssilviu/.bashrc:62:9: error: incomplete universal character name \u
   62 |     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:62:9: warning: unknown escape sequence: '\h'
/home/ssilviu/.bashrc:62:9: warning: unknown escape sequence: '\w'
/home/ssilviu/.bashrc:62:9: warning: unknown escape sequence: '\$'
/home/ssilviu/.bashrc:62:9: warning: character constant too long for its type
/home/ssilviu/.bashrc:66:3: error: invalid preprocessing directive #If; did you mean #if?
   66 | # If this is an xterm set the title to user@host:dir
      |   ^~
      |   if
/home/ssilviu/.bashrc:75:3: error: invalid preprocessing directive #enable
   75 | # enable color support of ls and also add handy aliases
      |   ^~~~~~
/home/ssilviu/.bashrc:78:14: warning: character constant too long for its type
   78 |     alias ls='ls --color=auto'
      |              ^~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:79:6: error: invalid preprocessing directive #alias
   79 |     #alias dir='dir --color=auto'
      |      ^~~~~
/home/ssilviu/.bashrc:80:6: error: invalid preprocessing directive #alias
   80 |     #alias vdir='vdir --color=auto'
      |      ^~~~~
/home/ssilviu/.bashrc:82:16: warning: character constant too long for its type
   82 |     alias grep='grep --color=auto'
      |                ^~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:83:17: warning: character constant too long for its type
   83 |     alias fgrep='fgrep --color=auto'
      |                 ^~~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:84:17: warning: character constant too long for its type
   84 |     alias egrep='egrep --color=auto'
      |                 ^~~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:87:3: error: invalid preprocessing directive #colored
   87 | # colored GCC warnings and errors
      |   ^~~~~~~
/home/ssilviu/.bashrc:88:2: error: invalid preprocessing directive #export; did you mean #import?
   88 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
      |  ^~~~~~
      |  import
/home/ssilviu/.bashrc:90:3: error: invalid preprocessing directive #some
   90 | # some more ls aliases
      |   ^~~~
/home/ssilviu/.bashrc:91:10: warning: character constant too long for its type
   91 | alias ll='ls -alF'
      |          ^~~~~~~~~
/home/ssilviu/.bashrc:92:10: warning: character constant too long for its type
   92 | alias la='ls -A'
      |          ^~~~~~~
/home/ssilviu/.bashrc:93:9: warning: character constant too long for its type
   93 | alias l='ls -CF'
      |         ^~~~~~~~
/home/ssilviu/.bashrc:95:3: error: invalid preprocessing directive #Add
   95 | # Add an "alert" alias for long running commands.  Use like so:
      |   ^~~
/home/ssilviu/.bashrc:96:5: error: invalid preprocessing directive #sleep
   96 | #   sleep 10; alert
      |     ^~~~~
/home/ssilviu/.bashrc:97:13: warning: character constant too long for its type
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ssilviu/.bashrc:97:118: error: stray ‘\’ in program
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |                                                                                                                      ^
/home/ssilviu/.bashrc:97:119: error: empty character constant
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |                                                                                                                       ^~~
/home/ssilviu/.bashrc:97:124: error: stray ‘\’ in program
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |                                                                                                                            ^
/home/ssilviu/.bashrc:97:132: error: stray ‘\’ in program
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |                                                                                                                                    ^
/home/ssilviu/.bashrc:97:134: error: stray ‘\’ in program
   97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      |                                                                                                                                      ^
/home/ssilviu/.bashrc:99:3: error: invalid preprocessing directive #Alias
   99 | # Alias definitions.
      |   ^~~~~
/home/ssilviu/.bashrc:100:3: error: invalid preprocessing directive #You
  100 | # You may want to put all your additions into a separate file like
      |   ^~~
/home/ssilviu/.bashrc:101:3: error: invalid preprocessing directive #~
  101 | # ~/.bash_aliases, instead of adding them here directly.
      |   ^
/home/ssilviu/.bashrc:102:3: error: invalid preprocessing directive #See
  102 | # See /usr/share/doc/bash-doc/examples in the bash-doc package.
      |   ^~~
/home/ssilviu/.bashrc:108:3: error: invalid preprocessing directive #enable
  108 | # enable programmable completion features (you don't need to enable
      |   ^~~~~~
/home/ssilviu/.bashrc:108:51: warning: missing terminating ' character
  108 | # enable programmable completion features (you don't need to enable
      |                                                   ^
/home/ssilviu/.bashrc:109:3: error: invalid preprocessing directive #this
  109 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
      |   ^~~~
/home/ssilviu/.bashrc:109:14: warning: missing terminating ' character
  109 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
      |              ^
/home/ssilviu/.bashrc:110:3: error: invalid preprocessing directive #sources
  110 | # sources /etc/bash.bashrc).
      |   ^~~~~~~
/home/ssilviu/.bashrc:6:1: error: expected unqualified-id before ‘case’
    6 | case $- in
      | ^~~~
/home/ssilviu/.bashrc:8:8: error: expected unqualified-id before ‘)’ token
    8 |       *) return;;
      |        ^
/home/ssilviu/.bashrc:9:1: error: ‘esac’ does not name a type
    9 | esac
      | ^~~~
/home/ssilviu/.bashrc:34:62: error: ‘then’ does not name a type
   34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
      |                                                              ^~~~
/home/ssilviu/.bashrc:41:1: error: ‘esac’ does not name a type
   41 | esac
      | ^~~~
/home/ssilviu/.bashrc:48:34: error: ‘then’ does not name a type
   48 | if [ -n "$force_color_prompt" ]; then
      |                                  ^~~~
/home/ssilviu/.bashrc:49:58: error: ‘then’ does not name a type
   49 |     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
      |                                                          ^~~~
/home/ssilviu/.bashrc:59:31: error: ‘then’ does not name a type
   59 | if [ "$color_prompt" = yes ]; then
      |                               ^~~~
/home/ssilviu/.bashrc:71:2: error: expected unqualified-id before ‘)’ token
   71 | *)
      |  ^
/home/ssilviu/.bashrc:73:1: error: ‘esac’ does not name a type
   73 | esac
      | ^~~~
/home/ssilviu/.bashrc:76:31: error: ‘then’ does not name a type
   76 | if [ -x /usr/bin/dircolors ]; then
      |                               ^~~~
/home/ssilviu/.bashrc:104:28: error: ‘then’ does not name a type
  104 | if [ -f ~/.bash_aliases ]; then
      |                            ^~~~
/home/ssilviu/.bashrc:111:23: error: ‘then’ does not name a type
  111 | if ! shopt -oq posix; then
      |                       ^~~~
/home/ssilviu/.bashrc:112:57: error: ‘then’ does not name a type
  112 |   if [ -f /usr/share/bash-completion/bash_completion ]; then
      |                                                         ^~~~
/home/ssilviu/.bashrc:114:37: error: ‘then’ does not name a type
  114 |   elif [ -f /etc/bash_completion ]; then
      |                                     ^~~~

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 Urare 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!