Language: C++

Last login: Sun Jun  2 21:52:27 on ttys003
FredrnoMacBook-ea:~ iwasi$ cd Documents/
FredrnoMacBook-ea:Documents iwasi$ ls
Deutsch		Projects	Xcode		keep
FredrnoMacBook-ea:Documents iwasi$ cd Projects/
FredrnoMacBook-ea:Projects iwasi$ ls
a.out				git-tutorial
atcoder				linearAlgebraForProgramming
cdng				seikei
cmakeTest			testcpp.cpp
codingame			testcpp.cpp~
FredrnoMacBook-ea:Projects iwasi$ cd cdng
FredrnoMacBook-ea:cdng iwasi$ ls
#CamelUp.cpp#			joi18_2.cpp
#MultiPictureChange.java#	joi18_2.cpp~
#a#				joi18_3.cpp
#bnf.cpp#			joi18_3.cpp~
#books.cpp#			joi18_4.cpp
#calicurator.cpp#		joi18_4.cpp~
#hanahuda.cpp#			k
114_a.cpp			kannnon.cpp
114_a.cpp~			kensyou.cpp
114_b.cpp			kensyou.cpp~
114_b.cpp~			keysys.cpp
114_c.cpp			lang
114_c.cpp~			lcs.cpp
114_d.cpp			lcs.cpp~
114_d.cpp~			limitedInsertion.cpp
115_b.cpp			limitedInsertion.cpp~
115_b.cpp~			lisp-programing
115_c.cpp			list.cpp
115_c.cpp~			list.cpp~
115_d.cpp			list_test.cpp
115_d.cpp~			list_test.cpp~
3nara.cpp			lll.cpp
CamelUp				lthkthn.cpp
CollatzProblem.cpp		lthkthn.cpp~
DecayedBridges.cpp		makehash.cpp
DecayedBridges.cpp~		makehash.cpp~
DigitalGifts.cpp		marge_sort.cpp
FoodsLovedbyEveryone.cpp	marge_sort.cpp~
FoodsLovedbyEveryone.cpp~	matrix.cpp
GrandGarden.cpp			matrix.cpp~
GrandGarden.cpp~		matryoshka.cpp
K-thCommonDivisor.cpp		matryoshka2.cpp
K-thCommonDivisor.cpp~		matryoshka3.cpp
KMB010CSV01(12).csv		maximum_profit.cpp
KMB010CSV01(12).csv~		maximum_profit.cpp~
LazyFaith.cpp			minatoharukasu.cpp
LazyFaith.cpp~			minatoharukasu.cpp~
MatchMatching.cpp		mines.cpp
MatchMatching.cpp~		mines.cpp~
Mine				mizuyokan.cpp
MonstersBattleRoyale.cpp	n
MonstersBattleRoyale.cpp~	napz.cpp
MultiButtonListener.class	napz.cpp~
MultiPictureChange.class	national_bg.cpp
Still.cppTBD			national_bg.cpp~
String.cpp			national_budget.cpp
SyntheticKadomatsu.cpp		null.cpp
SyntheticKadomatsu.cpp~		null.cpp~
Test.class			number_of_island.cpp
Test.java			opengl_test
VariousSushi.cpp		origami.cpp
VariousSushi.cpp~		origami.cpp~
_a.cpp				output.txt
_a.cpp~				pala.cpp
_b.cpp				pala.cpp~
_b.cpp~				past.cpp~
_c.cpp				pasta.cpp
_c.cpp~				pasta.cpp~
a.cpp				perlPrac
a.cpp~				playoff.cpp
a.out				playoff.cpp~
a.perl				point_inside.cpp
a.perl~				point_inside.cpp~
a.txt				point_of_triangle.cpp
a[i]				point_of_triangle.cpp~
a__b.cpp			point_of_triangle2.cpp
a__b.cpp~			point_of_triangle2.cpp~
a_un.cpp			polygon.cpp
abc115_a.cpp			polygon.cpp~
add.cpp				priority_queue.cpp
add.s				puzzle16.cpp
allocation.cpp			puzzle16.cpp~
allocation.cpp~			puzzle8.cpp
animation.cpp			puzzle8.cpp~
atcodeer.cpp			pyon.cpp~
b.cpp				railway.cpp
b.out				range_min.cpp
ball.cpp			range_min.cpp~
bfs.cpp				range_search.cpp
bfs.cpp~			range_search.cpp~
binary_tree.cpp			range_sum.cpp
bmi.cpp				range_sum.cpp~
bnf.cpp				rank_checker.cpp
bnf.cpp~			rithm.cpp
books.cpp			rithm.cpp~
books.cpp~			ruq.cpp
caeser.cpp			rust
caeser.cpp~			saitan.cpp
cake.cpp			saitan.cpp~
cake.cpp~			secret_number.cpp
cake2.cpp			shellSort.cpp
cake2.cpp~			shellSort.cpp~
cali.out			smart_cali.cpp
calicurator.cpp			smart_cali.cpp~
calicurator.cpp~		sort.cpp
canYouSolveThis.cpp		sort.cpp~
card_game.cpp			sticks.cpp
cmlrup.cpp			stillTBD.cpp
cmlrup.cpp~			stillTBD.cpp~
combinatorial.cpp		stones.cpp
combinatorial.cpp~		stones.cpp~
console_test.cpp		strange_bank.cpp
console_test.cpp~		strange_bank.cpp~
count.cpp			streamline.cpp
count.cpp~			streamline.cpp~
country_road.cpp		string_matching.cpp
country_road.cpp~		subway.cpp
csv_edit.cpp			sumofnum.cpp
csv_edit.cpp~			taro.cpp
dice2.cpp			taro.cpp~
diff_uft.cpp			test
diff_uft.cpp~			test.cpp
dijkstra.cpp			test.cpp~
dijkstra.cpp~			test.html
energydrinkcollector.cpp	threeColors.cpp
energydrinkcollector.cpp~	threeColors.cpp~
fib.cpp				track.cpp
firstgrader.cpp			trading.cpp
firstgrader.cpp~		treasure_hunt.cpp
fivetransportations.cpp		treasure_hunt.cpp~
fivetransportations.cpp~	tree.cpp
foward_list.cpp			trueLiars.cpp
frog1.cpp			trueLiars.cpp~
frog2.cpp			tyouhoukei.cpp
frog2.cpp~			uft1.cpp
functinal.cpp			uft1.cpp~
functinal.cpp~			unification.cpp
gamble.cpp			unification.cpp~
gamble.cpp~			vacation.cpp
getac.cpp			vacation.cpp~
getac.cpp~			weLikeAgc.cpp
heiankyo_wolking.cpp		weLikeAgc.cpp~
heiankyo_wolking.cpp~		weight.cpp
hotdays.cpp			what_color.cpp
hotdays.cpp~			what_color.cpp~
hoto.cpp			whiteCells.cpp
hoto.cpp~			whiteCells.cpp~
hskl				word_sort.cpp
html				word_sort.cpp~
hw.c				x
hw.c~				xorWorld.cpp
illumination.cpp		xorWorld.cpp~
illumination.cpp~		xxor.cpp
jag.cpp				xxor.cpp~
joi18_1.cpp			y
joi18_1.cpp~
FredrnoMacBook-ea:cdng iwasi$ emacs 113_a.cpp -nw

File Edit Options Buffers Tools C++ YASnippet Help                              
#include<iostream>                                                              
#include<vector>                                                                
                                                                                
                                                                                
                                                                                
using namespace std;                                                            
int main(){                                                                     
  int n,t,a;cin >>  n >> t >> a;                                                
  a -=t;                                                                        
  double ans= 1.0e+9, ansi;                                                     
  for(int i = 0; i < n; ++i){                                                   
    double h; cin >> h;                                                         
    h = abs(a + (0.006 * h));                                                   
    if(h < ans){                                                                
      ans = h;ansi = i;                                                         
    }                                                                           
  }                                                                             
  cout << ansi+1<<endl;                                                         
                                                                                
              return 0;                                                                  
}                           

Compiler output:
a.cc:14:2: error: invalid preprocessing directive #CamelUp
   14 | #CamelUp.cpp#                   joi18_2.cpp
      |  ^~~~~~~
a.cc:15:2: error: invalid preprocessing directive #MultiPictureChange
   15 | #MultiPictureChange.java#       joi18_2.cpp~
      |  ^~~~~~~~~~~~~~~~~~
a.cc:16:2: error: invalid preprocessing directive #a
   16 | #a#                             joi18_3.cpp
      |  ^
a.cc:17:2: error: invalid preprocessing directive #bnf
   17 | #bnf.cpp#                       joi18_3.cpp~
      |  ^~~
a.cc:18:2: error: invalid preprocessing directive #books
   18 | #books.cpp#                     joi18_4.cpp
      |  ^~~~~
a.cc:19:2: error: invalid preprocessing directive #calicurator
   19 | #calicurator.cpp#               joi18_4.cpp~
      |  ^~~~~~~~~~~
a.cc:20:2: error: invalid preprocessing directive #hanahuda
   20 | #hanahuda.cpp#                  k
      |  ^~~~~~~~
a.cc:1:1: error: 'Last' does not name a type
    1 | Last login: Sun Jun  2 21:52:27 on ttys003
      | ^~~~
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:163:
/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/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
  162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
      |                                                                      ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
  163 |   __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
      |                                                                         ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
  164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
      |                          ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
  164 | _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:164:70: error: expected primary-expression before ',' token
  164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
      |                                                                      ^
/usr/include/c++/14/new:164:72: error: expected primary-expression