Skip to content

Commit 40e44ab

Browse files
committedFeb 13, 2025
worked on some flashcards
1 parent 6fc62a6 commit 40e44ab

File tree

3 files changed

+851
-21
lines changed

3 files changed

+851
-21
lines changed
 

‎anki

491 KB
Binary file not shown.

‎anki.cpp

Lines changed: 201 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,227 @@
22

33
using namespace std;
44

5-
string addBinary(string a, string b)
5+
void iterativePostOrderTraversal(TreeNode *root)
66
{
7-
int i = a.size() - 1;
8-
int j = b.size() - 1;
9-
int carry = 0;
10-
11-
string c = "";
12-
while (i >= 0 || j >= 0 || carry != 0)
7+
stack<TreeNode *> nextNodes;
8+
while (!nextNodes.empty() || root != nullptr)
139
{
14-
if (i >= 0 && a[i] == '1')
15-
++carry;
16-
if (j >= 0 && b[j] == '1')
17-
++carry;
18-
19-
c = to_string(carry % 2) + c;
20-
carry /= 2;
21-
--i;
22-
--j;
10+
if (root != nullptr)
11+
{
12+
nextNodes.push(root);
13+
root = root->left;
14+
}
15+
else
16+
{
17+
TreeNode *temp = nextNodes.top()->right;
18+
if (temp == nullptr)
19+
{
20+
temp = nextNodes.top();
21+
nextNodes.pop();
22+
printf("%d ", temp->val);
23+
while (!nextNodes.empty() && nextNodes.top()->right == temp)
24+
{
25+
temp = nextNodes.top();
26+
nextNodes.pop();
27+
printf("%d ", temp->val);
28+
}
29+
}
30+
else
31+
root = temp;
32+
}
2333
}
24-
return c;
2534
}
2635

2736
int decodeWays(string s)
2837
{
2938
vector<int> dp(s.size() + 1, 1);
3039
for (int i = s.size() - 1; i >= 0; --i)
3140
{
41+
int val = 0;
3242
if (s[i] == '0')
3343
{
3444
dp[i] = 0;
3545
continue;
3646
}
37-
dp[i] = dp[i + 1];
38-
if (i < s.size() - 1 && (s[i] == '1' || (s[i] == '2' && int(s[i + 1]) <= 54)))
39-
dp[i] += dp[i + 2];
47+
val += dp[i + 1];
48+
if (i + 2 <= s.size() && (s[i] == '1' || (s[i] == '2' && int(s[i + 1]) <= 54)))
49+
val += dp[i + 2];
50+
dp[i] = val;
4051
}
4152
return dp[0];
4253
}
4354

55+
void goodSamples()
56+
{
57+
long long N, M, K;
58+
scanf("%lld %lld %lld", &N, &M, &K);
59+
60+
vector<long long> result;
61+
for (long long i = 0; i < N; ++i)
62+
{
63+
long long notesRemainingAfterCurrent = N - i - 1;
64+
long long maximumNotesAtCurrent = min(M, K - notesRemainingAfterCurrent);
65+
66+
if (maximumNotesAtCurrent <= 0)
67+
break;
68+
69+
long long value = 0;
70+
if (maximumNotesAtCurrent > i)
71+
{
72+
value = min(M, i + 1);
73+
maximumNotesAtCurrent = value;
74+
}
75+
else
76+
value = result[i - maximumNotesAtCurrent];
77+
result.push_back(value);
78+
K -= maximumNotesAtCurrent;
79+
}
80+
81+
if (K == 0 && result.size() == N)
82+
{
83+
for (long long i = 0; i < result.size(); ++i)
84+
printf("%lld ", result[i]);
85+
printf("\n");
86+
return;
87+
}
88+
printf("-1\n");
89+
}
90+
91+
vector<int> nextGreaterElement(vector<int> &nums1, vector<int> &nums2)
92+
{
93+
unordered_map<int, int> nums1Hash;
94+
for (int i = 0; i < nums1.size(); ++i)
95+
nums1Hash[nums1[i]] = i;
96+
97+
stack<int> descendingElements;
98+
vector<int> res(nums1.size(), -1);
99+
for (int i = 0; i < nums2.size(); ++i)
100+
{
101+
while (!descendingElements.empty() && nums2[i] > descendingElements.top())
102+
{
103+
int value = nums2[i];
104+
res[nums1Hash[descendingElements.top()]] = value;
105+
descendingElements.pop();
106+
}
107+
if (nums1Hash.count(nums2[i]) > 0)
108+
descendingElements.push(nums2[i]);
109+
}
110+
111+
return res;
112+
}
113+
114+
int kokoEatingBananas(vector<int> &piles, int h)
115+
{
116+
sort(piles.begin(), piles.end());
117+
int low = 1;
118+
int high = piles[piles.size() - 1];
119+
int mid;
120+
121+
int minimumSpeed = high;
122+
int previousMid = -1;
123+
while (low < high)
124+
{
125+
mid = (low + high) / 2;
126+
if (mid == previousMid)
127+
break;
128+
int numberOfHoursTaken = 0;
129+
for (int i = 0; i < piles.size(); ++i)
130+
{
131+
numberOfHoursTaken += piles[i] / mid;
132+
piles[i] % mid == 0 ? numberOfHoursTaken += 0 : ++numberOfHoursTaken;
133+
}
134+
if (numberOfHoursTaken > h)
135+
low = mid;
136+
else if (numberOfHoursTaken <= h)
137+
{
138+
high = mid;
139+
minimumSpeed = mid;
140+
}
141+
previousMid = mid;
142+
}
143+
return minimumSpeed;
144+
}
145+
146+
void nailedIt()
147+
{
148+
int N;
149+
scanf("%d", &N);
150+
vector<int> heightCounts(2001);
151+
for (int i = 0; i < N; ++i)
152+
{
153+
int temp;
154+
scanf("%d", &temp);
155+
++heightCounts[temp];
156+
}
157+
158+
vector<int> combinations(4001);
159+
for (int i = 0; i < heightCounts.size(); ++i)
160+
{
161+
if (heightCounts[i] == 0)
162+
continue;
163+
if (heightCounts[i] > 1)
164+
combinations[i * 2] += heightCounts[i] / 2;
165+
for (int j = i + 1; j < heightCounts.size(); ++j)
166+
{
167+
if (j == 0)
168+
continue;
169+
combinations[i + j] += min(heightCounts[i], heightCounts[j]);
170+
}
171+
}
172+
173+
int longestFence = 1;
174+
int numberOfHeights = 0;
175+
for (int i = 0; i < combinations.size(); ++i)
176+
{
177+
if (combinations[i] > longestFence)
178+
{
179+
longestFence = combinations[i];
180+
numberOfHeights = 1;
181+
}
182+
else if (combinations[i] == longestFence)
183+
++numberOfHeights;
184+
}
185+
printf("%d %d\n", longestFence, numberOfHeights);
186+
}
187+
188+
int uniqueLength3PalindromicSubsequences(string s)
189+
{
190+
unordered_map<char, int> startIndexes;
191+
unordered_map<char, int> endIndexes;
192+
for (int i = 0; i < s.size(); ++i)
193+
{
194+
if (startIndexes.count(s[i]) == 0)
195+
{
196+
startIndexes[s[i]] = i;
197+
endIndexes[s[i]] = i;
198+
}
199+
else
200+
endIndexes[s[i]] = i;
201+
}
202+
203+
int numberOfSubsequences = 0;
204+
set<string> subsequences;
205+
for (auto el : startIndexes)
206+
{
207+
for (int j = el.second + 1; j < endIndexes[el.first]; ++j)
208+
{
209+
string temp;
210+
temp += el.first;
211+
temp += s[j];
212+
temp += s[endIndexes[el.first]];
213+
214+
if (subsequences.count(temp) > 0)
215+
continue;
216+
++numberOfSubsequences;
217+
subsequences.insert(temp);
218+
}
219+
subsequences.clear();
220+
}
221+
return numberOfSubsequences;
222+
}
223+
44224
int main()
45225
{
46-
cout << decodeWays("11106");
226+
cout << uniqueLength3PalindromicSubsequences("bbcbaba") << endl;
47227
return 0;
48228
}

‎build/CMakeFiles/CMakeError.log

Lines changed: 650 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,3 +3898,653 @@ gmake: *** [Makefile:127: cmTC_047d5/fast] Error 2
38983898

38993899

39003900

3901+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3902+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3903+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3904+
Id flags:
3905+
3906+
The output was:
3907+
1
3908+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
3909+
collect2.exe: error: ld returned 1 exit status
3910+
3911+
3912+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3913+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3914+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3915+
Id flags: -c
3916+
3917+
The output was:
3918+
1
3919+
Assembler messages:
3920+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
3921+
CMakeCCompilerId.c:802:1: fatal error: error closing -: Invalid argument
3922+
802 | }
3923+
| ^
3924+
compilation terminated.
3925+
3926+
3927+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3928+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3929+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3930+
Id flags: -Aa
3931+
3932+
The output was:
3933+
1
3934+
<command-line>: error: missing '(' after predicate
3935+
3936+
3937+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3938+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3939+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3940+
Id flags: -D__CLASSIC_C__
3941+
3942+
The output was:
3943+
1
3944+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
3945+
collect2.exe: error: ld returned 1 exit status
3946+
3947+
3948+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3949+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3950+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3951+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
3952+
3953+
The output was:
3954+
1
3955+
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
3956+
gcc.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
3957+
3958+
3959+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3960+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3961+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
3962+
Id flags: -c;-I__does_not_exist__
3963+
3964+
The output was:
3965+
1
3966+
Assembler messages:
3967+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
3968+
CMakeCCompilerId.c:802:1: fatal error: error closing -: Invalid argument
3969+
802 | }
3970+
| ^
3971+
compilation terminated.
3972+
3973+
3974+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3975+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3976+
Build flags:
3977+
Id flags:
3978+
3979+
The output was:
3980+
1
3981+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
3982+
collect2.exe: error: ld returned 1 exit status
3983+
3984+
3985+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3986+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3987+
Build flags:
3988+
Id flags: -c
3989+
3990+
The output was:
3991+
1
3992+
Assembler messages:
3993+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
3994+
3995+
3996+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
3997+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
3998+
Build flags:
3999+
Id flags: -Aa
4000+
4001+
The output was:
4002+
1
4003+
<command-line>: error: missing '(' after predicate
4004+
4005+
4006+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4007+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4008+
Build flags:
4009+
Id flags: -D__CLASSIC_C__
4010+
4011+
The output was:
4012+
1
4013+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4014+
collect2.exe: error: ld returned 1 exit status
4015+
4016+
4017+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4018+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4019+
Build flags:
4020+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4021+
4022+
The output was:
4023+
1
4024+
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4025+
gcc.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4026+
4027+
4028+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4029+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4030+
Build flags:
4031+
Id flags: -c;-I__does_not_exist__
4032+
4033+
The output was:
4034+
1
4035+
Assembler messages:
4036+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
4037+
4038+
4039+
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
4040+
gcc.exe: fatal error: no input files
4041+
compilation terminated.
4042+
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
4043+
gcc.exe: fatal error: no input files
4044+
compilation terminated.
4045+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4046+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4047+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4048+
Id flags:
4049+
4050+
The output was:
4051+
1
4052+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4053+
collect2.exe: error: ld returned 1 exit status
4054+
4055+
4056+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4057+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4058+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4059+
Id flags: -c
4060+
4061+
The output was:
4062+
1
4063+
Assembler messages:
4064+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4065+
CMakeCXXCompilerId.cpp:791:1: fatal error: error closing -: Invalid argument
4066+
791 | }
4067+
| ^
4068+
compilation terminated.
4069+
4070+
4071+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4072+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4073+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4074+
Id flags: --c++
4075+
4076+
The output was:
4077+
1
4078+
g++.exe: error: unrecognized command-line option '--c++'
4079+
4080+
4081+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4082+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4083+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4084+
Id flags: --ec++
4085+
4086+
The output was:
4087+
1
4088+
g++.exe: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'?
4089+
4090+
4091+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4092+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4093+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4094+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4095+
4096+
The output was:
4097+
1
4098+
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4099+
g++.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4100+
4101+
4102+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4103+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4104+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4105+
Id flags: -c;-I__does_not_exist__
4106+
4107+
The output was:
4108+
1
4109+
Assembler messages:
4110+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4111+
CMakeCXXCompilerId.cpp:791:1: fatal error: error closing -: Invalid argument
4112+
791 | }
4113+
| ^
4114+
compilation terminated.
4115+
4116+
4117+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4118+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4119+
Build flags:
4120+
Id flags:
4121+
4122+
The output was:
4123+
1
4124+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4125+
collect2.exe: error: ld returned 1 exit status
4126+
4127+
4128+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4129+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4130+
Build flags:
4131+
Id flags: -c
4132+
4133+
The output was:
4134+
1
4135+
Assembler messages:
4136+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4137+
4138+
4139+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4140+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4141+
Build flags:
4142+
Id flags: --c++
4143+
4144+
The output was:
4145+
1
4146+
g++.exe: error: unrecognized command-line option '--c++'
4147+
4148+
4149+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4150+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4151+
Build flags:
4152+
Id flags: --ec++
4153+
4154+
The output was:
4155+
1
4156+
g++.exe: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'?
4157+
4158+
4159+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4160+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4161+
Build flags:
4162+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4163+
4164+
The output was:
4165+
1
4166+
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4167+
g++.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4168+
4169+
4170+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4171+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4172+
Build flags:
4173+
Id flags: -c;-I__does_not_exist__
4174+
4175+
The output was:
4176+
1
4177+
Assembler messages:
4178+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4179+
4180+
4181+
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
4182+
g++.exe: fatal error: no input files
4183+
compilation terminated.
4184+
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
4185+
g++.exe: fatal error: no input files
4186+
compilation terminated.
4187+
Detecting C compiler ABI info failed to compile with the following output:
4188+
Change Dir: /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp
4189+
4190+
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_cecc3/fast && /usr/bin/gmake -f CMakeFiles/cmTC_cecc3.dir/build.make CMakeFiles/cmTC_cecc3.dir/build
4191+
gmake[1]: Entering directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4192+
Building C object CMakeFiles/cmTC_cecc3.dir/CMakeCCompilerABI.c.o
4193+
/mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/user/miniconda3/include -o CMakeFiles/cmTC_cecc3.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c
4194+
Assembler messages:
4195+
Fatal error: can't create CMakeFiles/cmTC_cecc3.dir/CMakeCCompilerABI.c.o: Invalid argument
4196+
/usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c:27:1: fatal error: error closing -: Invalid argument
4197+
27 | }
4198+
| ^
4199+
compilation terminated.
4200+
gmake[1]: *** [CMakeFiles/cmTC_cecc3.dir/build.make:78: CMakeFiles/cmTC_cecc3.dir/CMakeCCompilerABI.c.o] Error 1
4201+
gmake[1]: Leaving directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4202+
gmake: *** [Makefile:127: cmTC_cecc3/fast] Error 2
4203+
4204+
4205+
4206+
4207+
Determining if the C compiler works failed with the following output:
4208+
Change Dir: /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp
4209+
4210+
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_eea8d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_eea8d.dir/build.make CMakeFiles/cmTC_eea8d.dir/build
4211+
gmake[1]: Entering directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4212+
Building C object CMakeFiles/cmTC_eea8d.dir/testCCompiler.c.o
4213+
/mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/user/miniconda3/include -o CMakeFiles/cmTC_eea8d.dir/testCCompiler.c.o -c /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp/testCCompiler.c
4214+
Assembler messages:
4215+
Fatal error: can't create CMakeFiles/cmTC_eea8d.dir/testCCompiler.c.o: Invalid argument
4216+
/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp/testCCompiler.c:11:1: fatal error: error closing -: Invalid argument
4217+
11 | { (void)argv; return argc-1;}
4218+
| ^
4219+
compilation terminated.
4220+
gmake[1]: *** [CMakeFiles/cmTC_eea8d.dir/build.make:78: CMakeFiles/cmTC_eea8d.dir/testCCompiler.c.o] Error 1
4221+
gmake[1]: Leaving directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4222+
gmake: *** [Makefile:127: cmTC_eea8d/fast] Error 2
4223+
4224+
4225+
4226+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4227+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4228+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4229+
Id flags:
4230+
4231+
The output was:
4232+
1
4233+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4234+
collect2.exe: error: ld returned 1 exit status
4235+
4236+
4237+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4238+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4239+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4240+
Id flags: -c
4241+
4242+
The output was:
4243+
1
4244+
Assembler messages:
4245+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
4246+
CMakeCCompilerId.c:802:1: fatal error: error closing -: Invalid argument
4247+
802 | }
4248+
| ^
4249+
compilation terminated.
4250+
4251+
4252+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4253+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4254+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4255+
Id flags: -Aa
4256+
4257+
The output was:
4258+
1
4259+
<command-line>: error: missing '(' after predicate
4260+
4261+
4262+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4263+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4264+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4265+
Id flags: -D__CLASSIC_C__
4266+
4267+
The output was:
4268+
1
4269+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4270+
collect2.exe: error: ld returned 1 exit status
4271+
4272+
4273+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4274+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4275+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4276+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4277+
4278+
The output was:
4279+
1
4280+
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4281+
gcc.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4282+
4283+
4284+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4285+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4286+
Build flags: -march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4287+
Id flags: -c;-I__does_not_exist__
4288+
4289+
The output was:
4290+
1
4291+
Assembler messages:
4292+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
4293+
CMakeCCompilerId.c:802:1: fatal error: error closing -: Invalid argument
4294+
802 | }
4295+
| ^
4296+
compilation terminated.
4297+
4298+
4299+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4300+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4301+
Build flags:
4302+
Id flags:
4303+
4304+
The output was:
4305+
1
4306+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4307+
collect2.exe: error: ld returned 1 exit status
4308+
4309+
4310+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4311+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4312+
Build flags:
4313+
Id flags: -c
4314+
4315+
The output was:
4316+
1
4317+
Assembler messages:
4318+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
4319+
4320+
4321+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4322+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4323+
Build flags:
4324+
Id flags: -Aa
4325+
4326+
The output was:
4327+
1
4328+
<command-line>: error: missing '(' after predicate
4329+
4330+
4331+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4332+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4333+
Build flags:
4334+
Id flags: -D__CLASSIC_C__
4335+
4336+
The output was:
4337+
1
4338+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4339+
collect2.exe: error: ld returned 1 exit status
4340+
4341+
4342+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4343+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4344+
Build flags:
4345+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4346+
4347+
The output was:
4348+
1
4349+
gcc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4350+
gcc.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4351+
4352+
4353+
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
4354+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe
4355+
Build flags:
4356+
Id flags: -c;-I__does_not_exist__
4357+
4358+
The output was:
4359+
1
4360+
Assembler messages:
4361+
Fatal error: can't create CMakeCCompilerId.o: Invalid argument
4362+
4363+
4364+
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
4365+
gcc.exe: fatal error: no input files
4366+
compilation terminated.
4367+
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
4368+
gcc.exe: fatal error: no input files
4369+
compilation terminated.
4370+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4371+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4372+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4373+
Id flags:
4374+
4375+
The output was:
4376+
1
4377+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4378+
collect2.exe: error: ld returned 1 exit status
4379+
4380+
4381+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4382+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4383+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4384+
Id flags: -c
4385+
4386+
The output was:
4387+
1
4388+
Assembler messages:
4389+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4390+
CMakeCXXCompilerId.cpp:791:1: fatal error: error closing -: Invalid argument
4391+
791 | }
4392+
| ^
4393+
compilation terminated.
4394+
4395+
4396+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4397+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4398+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4399+
Id flags: --c++
4400+
4401+
The output was:
4402+
1
4403+
g++.exe: error: unrecognized command-line option '--c++'
4404+
4405+
4406+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4407+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4408+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4409+
Id flags: --ec++
4410+
4411+
The output was:
4412+
1
4413+
g++.exe: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'?
4414+
4415+
4416+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4417+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4418+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4419+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4420+
4421+
The output was:
4422+
1
4423+
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4424+
g++.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4425+
4426+
4427+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4428+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4429+
Build flags: -fvisibility-inlines-hidden;-fmessage-length=0;-march=nocona;-mtune=haswell;-ftree-vectorize;-fPIC;-fstack-protector-strong;-fno-plt;-O2;-ffunction-sections;-pipe;-isystem;/home/user/miniconda3/include
4430+
Id flags: -c;-I__does_not_exist__
4431+
4432+
The output was:
4433+
1
4434+
Assembler messages:
4435+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4436+
CMakeCXXCompilerId.cpp:791:1: fatal error: error closing -: Invalid argument
4437+
791 | }
4438+
| ^
4439+
compilation terminated.
4440+
4441+
4442+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4443+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4444+
Build flags:
4445+
Id flags:
4446+
4447+
The output was:
4448+
1
4449+
C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file a.exe: Invalid argument
4450+
collect2.exe: error: ld returned 1 exit status
4451+
4452+
4453+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4454+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4455+
Build flags:
4456+
Id flags: -c
4457+
4458+
The output was:
4459+
1
4460+
Assembler messages:
4461+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4462+
4463+
4464+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4465+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4466+
Build flags:
4467+
Id flags: --c++
4468+
4469+
The output was:
4470+
1
4471+
g++.exe: error: unrecognized command-line option '--c++'
4472+
4473+
4474+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4475+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4476+
Build flags:
4477+
Id flags: --ec++
4478+
4479+
The output was:
4480+
1
4481+
g++.exe: error: unrecognized command-line option '--ec++'; did you mean '-Weffc++'?
4482+
4483+
4484+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4485+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4486+
Build flags:
4487+
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
4488+
4489+
The output was:
4490+
1
4491+
g++.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
4492+
g++.exe: error: unrecognized command-line option '--target=arm-arm-none-eabi'
4493+
4494+
4495+
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
4496+
Compiler: /mnt/c/ProgramData/mingw64/mingw64/bin/g++.exe
4497+
Build flags:
4498+
Id flags: -c;-I__does_not_exist__
4499+
4500+
The output was:
4501+
1
4502+
Assembler messages:
4503+
Fatal error: can't create CMakeCXXCompilerId.o: Invalid argument
4504+
4505+
4506+
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
4507+
g++.exe: fatal error: no input files
4508+
compilation terminated.
4509+
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
4510+
g++.exe: fatal error: no input files
4511+
compilation terminated.
4512+
Detecting C compiler ABI info failed to compile with the following output:
4513+
Change Dir: /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp
4514+
4515+
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_cadc9/fast && /usr/bin/gmake -f CMakeFiles/cmTC_cadc9.dir/build.make CMakeFiles/cmTC_cadc9.dir/build
4516+
gmake[1]: Entering directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4517+
Building C object CMakeFiles/cmTC_cadc9.dir/CMakeCCompilerABI.c.o
4518+
/mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/user/miniconda3/include -o CMakeFiles/cmTC_cadc9.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c
4519+
Assembler messages:
4520+
Fatal error: can't create CMakeFiles/cmTC_cadc9.dir/CMakeCCompilerABI.c.o: Invalid argument
4521+
/usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c:27:1: fatal error: error closing -: Invalid argument
4522+
27 | }
4523+
| ^
4524+
compilation terminated.
4525+
gmake[1]: *** [CMakeFiles/cmTC_cadc9.dir/build.make:78: CMakeFiles/cmTC_cadc9.dir/CMakeCCompilerABI.c.o] Error 1
4526+
gmake[1]: Leaving directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4527+
gmake: *** [Makefile:127: cmTC_cadc9/fast] Error 2
4528+
4529+
4530+
4531+
4532+
Determining if the C compiler works failed with the following output:
4533+
Change Dir: /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp
4534+
4535+
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_97921/fast && /usr/bin/gmake -f CMakeFiles/cmTC_97921.dir/build.make CMakeFiles/cmTC_97921.dir/build
4536+
gmake[1]: Entering directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4537+
Building C object CMakeFiles/cmTC_97921.dir/testCCompiler.c.o
4538+
/mnt/c/ProgramData/mingw64/mingw64/bin/gcc.exe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/user/miniconda3/include -o CMakeFiles/cmTC_97921.dir/testCCompiler.c.o -c /home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp/testCCompiler.c
4539+
Assembler messages:
4540+
Fatal error: can't create CMakeFiles/cmTC_97921.dir/testCCompiler.c.o: Invalid argument
4541+
/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp/testCCompiler.c:11:1: fatal error: error closing -: Invalid argument
4542+
11 | { (void)argv; return argc-1;}
4543+
| ^
4544+
compilation terminated.
4545+
gmake[1]: *** [CMakeFiles/cmTC_97921.dir/build.make:78: CMakeFiles/cmTC_97921.dir/testCCompiler.c.o] Error 1
4546+
gmake[1]: Leaving directory '/home/user/code/Leetcode-DMOJ-Problems/build/CMakeFiles/CMakeTmp'
4547+
gmake: *** [Makefile:127: cmTC_97921/fast] Error 2
4548+
4549+
4550+

0 commit comments

Comments
 (0)
Please sign in to comment.