Language: C

Last login: Fri Aug 31 20:14:46 on console
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ ls
#あ#			Music			TEST			java2			pyworks
00.py			My			Untitled.ipynb		matlab_crash_dump.485-1	pywpork
AndroidStudioProjects	MyVagrant		Untitled1.ipynb		matlab_crash_dump.504-1	rails
Applications		New Unity Project	Vagrant			matlab_crash_dump.922-1	sample_app
Atcoder			New Unity Project 1	VirtualBox VMs		matlab_crash_dump.991-1	ta.py
Desktop			New Unity Project 2	anaconda		minpy			tutor
Documents		New Unity Project 3	anaconda3		my_app			vim_practice.txt
Downloads		Pictures		dotfiles		mybook
Dropbox			Public			eclipse			network
Library			PycharmProjects		extlib			python
Movies			Shadowverse		java			pywork
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ cd cpp
-bash: cd: cpp: No such file or directory
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ vim test.cpp
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ g++ test.cpp
3 4
1 test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
test.cpp:22:9: note: previous definition is here
#define REP(i, n) for (int i = 0; i < n; i++)
        ^
test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(k, n) for (int k = 0; k < n; k++)
        ^
test.cpp:23:9: note: previous definition is here
#define REP(j, n) for (int j = 0; j < n; j++)
        ^

2 warnings generated.
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ 3 4
-bash: 3: command not found
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ 1 
-bash: 1: command not found
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ g++ test.cpp
test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
test.cpp:22:9: note: previous definition is here
#define REP(i, n) for (int i = 0; i < n; i++)
        ^
test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(k, n) for (int k = 0; k < n; k++)
        ^
test.cpp:23:9: note: previous definition is here
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
2 warnings generated.
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ gc test.cpp
-bash: gc: command not found
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ 
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ gcc test.cpp
test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
test.cpp:22:9: note: previous definition is here
#define REP(i, n) for (int i = 0; i < n; i++)
        ^
test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(k, n) for (int k = 0; k < n; k++)
        ^
test.cpp:23:9: note: previous definition is here
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
2 warnings generated.
Undefined symbols for architecture x86_64:
  "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::__1::ios_base::getloc() const", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(int&)", referenced from:
      _main in test-992265.o
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)", referenced from:
      _main in test-992265.o
  "std::__1::cin", referenced from:
      _main in test-992265.o
  "std::__1::cout", referenced from:
      _main in test-992265.o
  "std::__1::ctype<char>::id", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::__1::locale::~locale()", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
  "std::terminate()", referenced from:
      ___clang_call_terminate in test-992265.o
  "___cxa_begin_catch", referenced from:
      ___clang_call_terminate in test-992265.o
  "___gxx_personality_v0", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      Dwarf Exception Unwind Info (__eh_frame) in test-992265.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ g++ test.cpp
test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
test.cpp:22:9: note: previous definition is here
#define REP(i, n) for (int i = 0; i < n; i++)
        ^
test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
#define REP(k, n) for (int k = 0; k < n; k++)
        ^
test.cpp:23:9: note: previous definition is here
#define REP(j, n) for (int j = 0; j < n; j++)
        ^
2 warnings generated.
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ vim test.cpp
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ g++ test.cpp
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ ./a.put
-bash: ./a.put: No such file or directory
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ ./a.out
3 4
6
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ ./a.out
2 2
1
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ ./a.out
5 7
24
nakajimakouhei-no-MacBook-Pro:~ nakajimakouhei$ vim test.cpp

  1 #include <iostream>
  2 #include <cstdio>
  3 #include <cstdlib>
  4 #include <cstring>
  5 #include <algorithm>
  6 #include <string>
  7 #include <sstream>
  8 #include <complex>
  9 #include <vector>
 10 #include <list>
 11 #include <queue>
 12 #include <deque>
 13 #include <stack>
 14 #include <map>
 15 #include <set>
 16 using namespace std;
 17 
 18 #define INF (1e9)
 19 #define PI (acos(-1))
 20 
 21 
 22 int main() {
 23   int A, B;
 24   int res;
 25 
 26   cin >> A >> B;
 27 
 28   res = A * B - A - B + 1;
 29 
 30   cout << res << endl;
 31 
 32   return 0;
 33 }
~                                                                                                                              
~                                                                                                                              
~                                                                                                                              
-- INSERT --


Compiler output:
main.c:1:1: error: unknown type name 'Last'
    1 | Last login: Fri Aug 31 20:14:46 on console
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | Last login: Fri Aug 31 20:14:46 on console
      |           ^
main.c:3:2: error: invalid preprocessing directive #\U00003042
    3 | #あ#                    Music                   TEST                    java2                   pyworks
      |  ^~
main.c:4:1: error: invalid suffix "py" on floating constant
    4 | 00.py                   My                      Untitled.ipynb          matlab_crash_dump.485-1 pywpork
      | ^~~~~
main.c:19:27: warning: multi-character character constant [-Wmultichar]
   19 | 1 test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                           ^~~~~
main.c:23:9: warning: "REP" redefined
   23 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:20:9: note: this is the location of the previous definition
   20 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:25:25: warning: multi-character character constant [-Wmultichar]
   25 | test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:26:9: warning: "REP" redefined
   26 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:23:9: note: this is the location of the previous definition
   23 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:29:9: warning: "REP" redefined
   29 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:26:9: note: this is the location of the previous definition
   26 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:38:25: warning: multi-character character constant [-Wmultichar]
   38 | test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:42:9: warning: "REP" redefined
   42 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:39:9: note: this is the location of the previous definition
   39 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:44:25: warning: multi-character character constant [-Wmultichar]
   44 | test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:45:9: warning: "REP" redefined
   45 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:42:9: note: this is the location of the previous definition
   42 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:48:9: warning: "REP" redefined
   48 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:45:9: note: this is the location of the previous definition
   45 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:55:25: warning: multi-character character constant [-Wmultichar]
   55 | test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:59:9: warning: "REP" redefined
   59 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:56:9: note: this is the location of the previous definition
   56 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:61:25: warning: multi-character character constant [-Wmultichar]
   61 | test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:62:9: warning: "REP" redefined
   62 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:59:9: note: this is the location of the previous definition
   59 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:65:9: warning: "REP" redefined
   65 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:62:9: note: this is the location of the previous definition
   62 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:70:189: error: invalid suffix "o" on floating constant
   70 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:72:189: error: invalid suffix "o" on floating constant
   72 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:74:21: error: invalid suffix "o" on floating constant
   74 |       _main in test-992265.o
      |                     ^~~~~~~~
main.c:76:189: error: invalid suffix "o" on floating constant
   76 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:78:189: error: invalid suffix "o" on floating constant
   78 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:80:21: error: invalid suffix "o" on floating constant
   80 |       _main in test-992265.o
      |                     ^~~~~~~~
main.c:82:21: error: invalid suffix "o" on floating constant
   82 |       _main in test-992265.o
      |                     ^~~~~~~~
main.c:84:21: error: invalid suffix "o" on floating constant
   84 |       _main in test-992265.o
      |                     ^~~~~~~~
main.c:86:189: error: invalid suffix "o" on floating constant
   86 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:88:189: error: invalid suffix "o" on floating constant
   88 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:90:39: error: invalid suffix "o" on floating constant
   90 |       ___clang_call_terminate in test-992265.o
      |                                       ^~~~~~~~
main.c:92:39: error: invalid suffix "o" on floating constant
   92 |       ___clang_call_terminate in test-992265.o
      |                                       ^~~~~~~~
main.c:94:189: error: invalid suffix "o" on floating constant
   94 |       std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-992265.o
      |                                                                                                                                                                                             ^~~~~~~~
main.c:95:56: error: invalid suffix "o" on floating constant
   95 |       Dwarf Exception Unwind Info (__eh_frame) in test-992265.o
      |                                                        ^~~~~~~~
main.c:99:25: warning: multi-character character constant [-Wmultichar]
   99 | test.cpp:23:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:103:9: warning: "REP" redefined
  103 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:100:9: note: this is the location of the previous definition
  100 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:105:25: warning: multi-character character constant [-Wmultichar]
  105 | test.cpp:24:9: warning: 'REP' macro redefined [-Wmacro-redefined]
      |                         ^~~~~
main.c:106:9: warning: "REP" redefined
  106 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:103:9: note: this is the location of the previous definition
  103 | #define REP(i, n) for (int i = 0; i < n; i++)
      |         ^~~
main.c:109:9: warning: "REP" redefined
  109 | #define REP(j, n) for (int j = 0; j < n; j++)
      |         ^~~
main.c:106:9: note: this is the location of the previous definition
  106 | #define REP(k, n) for (int k = 0; k < n; k++)
      |         ^~~
main.c:127:5: error: stray '#' in program
  127 |   1 #include <iostream>
      |     ^
main.c:128:5: error: stray '#' in program
  128 |   2 #include <cstdio>
      |     ^
main.c:129:5: error: stray '#' in program
  129 |   3 #include <cstdlib>
      |     ^
main.c:130:5: error: stray '#' in program
  130 |   4 #include <cstring>
      |     ^
main.c:131:5: error: stray '#' in program
  131 |   5 #include <algorithm>
      |     ^
main.c:132:5: error: stray '#' in program
  132 |   6 #include <string>
      |     ^
main.c:133:5: error: stray '#' in program
  133 |   7 #include <sstream>
      |     ^
main.c:134:5: error: stray '#' in program
  134 |   8 #include <complex>
      |