Language: C++

Last login: Thu Mar 15 16:22:44 on ttys002
YHnoMacbook-pro:alds1 derodontus$ vim 1-3p.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3p.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3c.cpp































YHnoMacbook-pro:alds1 derodontus$ vim 1-3c.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3c.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3a.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3c1.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3b1.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-3b2.cpp
YHnoMacbook-pro:alds1 derodontus$ ls
#1-3c.cpp#		72-1.cpp
1-3a.cpp		72.cpp
1-3b.cpp		73.cpp
1-3b1.cpp		86.cpp
1-3b2.cpp		a.out
1-3c.cpp		key=key
1-3c.cpp~		next
1-3c.txt		next-
1-3c1.cpp		next=nil-
1-3p.cpp		next=x
1-4a.cpp		prev=nil
59.c			prev=x
59.cpp			~vimrc
63.cpp			テキスト.txt
69.cpp
YHnoMacbook-pro:alds1 derodontus$ 109.cpp
-bash: 109.cpp: command not found
YHnoMacbook-pro:alds1 derodontus$ vim 109.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 109.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4a.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4a.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4b.cpp
YHnoMacbook-pro:alds1 derodontus$ cd ..
YHnoMacbook-pro:AOJ derodontus$ cd ..
YHnoMacbook-pro:C++ derodontus$ ls
AOJ		test
contest		便利ツール
YHnoMacbook-pro:C++ derodontus$ cd 便利ツール
YHnoMacbook-pro:便利ツール derodontus$ vim prime_number.cppYHnoMacbook-pro:便利ツール derodontus$ open prime_number.cpp
YHnoMacbook-pro:便利ツール derodontus$ cat prime_number.cpp 
#include<iostream>
using namespace std;

int a,b;
bool flag=1;

bool check_prime(int num){
    for(int i=2;i*i<=num;i++){
        if(num%i==0)
            return 0;

    }
    return 1;

}

int main(){
    int k;
    cout<<"素数を探したい範囲の最小値、最大値、個数を入力して下さい"<<"\n";
    cin>>a>>b>>k;
    if(k<=0){
        cout<<"個数は1以上で入力して下さい"<<"\n";
        return 0;
    }    
    if(a>=b){
        cout<<"最小値は最大値未満でお願いします"<<"\n";
        return 0;
    }



    int j=2;    
    for(int i=a;i<=b;i++){
        if(check_prime(i)){
            cout<<i<<"\n";
            k--;
        }    
    }
    cout<<"nothing"<<"\n";
    return 0;

}
YHnoMacbook-pro:便利ツール derodontus$ cd ../
YHnoMacbook-pro:C++ derodontus$ ls
AOJ		test
contest		便利ツール
YHnoMacbook-pro:C++ derodontus$ cd AOJ
YHnoMacbook-pro:AOJ derodontus$ ls
86		alds1		その他
86-1.cpp	itp
YHnoMacbook-pro:AOJ derodontus$ cd alds1
YHnoMacbook-pro:alds1 derodontus$ ls
#1-3c.cpp#		63.cpp
1-3a.cpp		69.cpp
1-3b.cpp		72-1.cpp
1-3b1.cpp		72.cpp
1-3b2.cpp		73.cpp
1-3c.cpp		86.cpp
1-3c.cpp~		a.out
1-3c.txt		key=key
1-3c1.cpp		next
1-3p.cpp		next-
1-4a.cpp		next=nil-
1-4a0			next=x
1-4b.cpp		prev=nil
109.cpp			prev=x
59.c			~vimrc
59.cpp			テキスト.txt
YHnoMacbook-pro:alds1 derodontus$ vim 1-4c.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4b.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4b1.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4b1.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-4d.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-5a.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-5c.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-5b.cpp
YHnoMacbook-pro:alds1 derodontus$ vim 1-5b.cpp
YHnoMacbook-pro:alds1 derodontus$ cd ..
YHnoMacbook-pro:AOJ derodontus$ ls
86		alds1		その他
86-1.cpp	itp
YHnoMacbook-pro:AOJ derodontus$ cd ..
YHnoMacbook-pro:C++ derodontus$ ls
AOJ		test
contest		便利ツール
YHnoMacbook-pro:C++ derodontus$ cd contst
-bash: cd: contst: No such file or directory
YHnoMacbook-pro:C++ derodontus$ cd contest
YHnoMacbook-pro:contest derodontus$ ls
2:10		grand		企業
JOI		regular		非公式
beginner	typical
YHnoMacbook-pro:contest derodontus$ cd beginner
YHnoMacbook-pro:beginner derodontus$ ls
084	085	086	087	088	089	090
YHnoMacbook-pro:beginner derodontus$ mkdir 091
YHnoMacbook-pro:beginner derodontus$ cd 091
YHnoMacbook-pro:091 derodontus$ vim A.cpp
YHnoMacbook-pro:091 derodontus$ vim B.cpp
YHnoMacbook-pro:091 derodontus$ vim C.cpp
YHnoMacbook-pro:091 derodontus$ vim D.cpp
YHnoMacbook-pro:091 derodontus$ vim A.cpp
YHnoMacbook-pro:091 derodontus$ vim B.cpp
YHnoMacbook-pro:091 derodontus$ vim B.cpp

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<string>
#include<vector>
using namespace std;
int N,M;
int main(){
    cin>>N;
    char s[N][11];
    for(int i=0;i<N;i++)
        cin>>s[i];
    cin>>M;
    char t[M][11];
    for(int j=0;j<M;j++)
        cin>>t[j];
        
    int cunt[N];
    for(int i=0;i<N;i++){
        cunt[i]=1;                                         
        for(int j=i+1;j<N;j++){
            if(strcmp(s[i],s[j])==0)
                cunt[i]++;
        }
        for(int j=0;j<M;j++){
            if(strcmp(s[i],t[j])==0)
                cunt[i]--;
        }
    }
    
    int max_num=-100;
    for(int i=0;i<N;i++){
        if(cunt[i]>max_num){
            max_num=cunt[i];
        }        
            
    }   
        
    cout<<max_num<<"\n";
    return 0;
        

}


Compiler output:
a.cc:43:3: error: "-" is not a valid filename
   43 | #1-3c.cpp#              72-1.cpp
      |   ^
a.cc:125:3: error: "-" is not a valid filename
  125 | #1-3c.cpp#              63.cpp
      |   ^
a.cc:167:1: error: invalid digit "8" in octal constant
  167 | 084     085     086     087     088     089     090
      | ^~~
a.cc:167:9: error: invalid digit "8" in octal constant
  167 | 084     085     086     087     088     089     090
      |         ^~~
a.cc:167:17: error: invalid digit "8" in octal constant
  167 | 084     085     086     087     088     089     090
      |                 ^~~
a.cc:167:25: error: invalid digit "8" in octal constant
  167 | 084     085     086     087     088     089     090
      |                         ^~~
a.cc:167:33: error: invalid digit "8" in octal constant
  167 | 084     085     086     087     088     089     090
      |                                 ^~~
a.cc:167:41: error: invalid digit "9" in octal constant
  167 | 084     085     086     087     088     089     090
      |                                         ^~~
a.cc:167:49: error: invalid digit "9" in octal constant
  167 | 084     085     086     087     088     089     090
      |                                                 ^~~
a.cc:168:44: error: invalid digit "9" in octal constant
  168 | YHnoMacbook-pro:beginner derodontus$ mkdir 091
      |                                            ^~~
a.cc:169:41: error: invalid digit "9" in octal constant
  169 | YHnoMacbook-pro:beginner derodontus$ cd 091
      |                                         ^~~
a.cc:170:17: error: invalid digit "9" in octal constant
  170 | YHnoMacbook-pro:091 derodontus$ vim A.cpp
      |                 ^~~
a.cc:171:17: error: invalid digit "9" in octal constant
  171 | YHnoMacbook-pro:091 derodontus$ vim B.cpp
      |                 ^~~
a.cc:172:17: error: invalid digit "9" in octal constant
  172 | YHnoMacbook-pro:091 derodontus$ vim C.cpp
      |                 ^~~
a.cc:173:17: error: invalid digit "9" in octal constant
  173 | YHnoMacbook-pro:091 derodontus$ vim D.cpp
      |                 ^~~
a.cc:174:17: error: invalid digit "9" in octal constant
  174 | YHnoMacbook-pro:091 derodontus$ vim A.cpp
      |                 ^~~
a.cc:175:17: error: invalid digit "9" in octal constant
  175 | YHnoMacbook-pro:091 derodontus$ vim B.cpp
      |                 ^~~
a.cc:176:17: error: invalid digit "9" in octal constant
  176 | YHnoMacbook-pro:091 derodontus$ vim B.cpp
      |                 ^~~
a.cc:1:1: error: 'Last' does not name a type
    1 | Last login: Thu Mar 15 16:22:44 on ttys002
      | ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:73:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
   68 |   typedef ptrdiff_t     streamsize; // Signed integral type
      |           ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
   40 | #include <cwchar> // For mbstate_t
  +++ |+#include <cstddef>
   41 | 
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                            ^~~~~~
In file included from /usr/include/wchar.h:35,
                 from /usr/include/c++/14/cwchar:44,
                 from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  132 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                          ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
  134 |   __attribute__((__externally_visible__));
      |                                         ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
  140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                             ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
  142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      |                               ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
  145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                    ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                          ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
  147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
      |                                                      ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
  154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
      |                                                                    ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
  155 |   __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
      |                                                                         ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                          ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                            ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                                                    ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
  156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                                                      ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                          ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                                              ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/