Skip to content

Commit 53d8c5d

Browse files
committed
export module leetcode_test.determine_if_two_events_have_conflict.Solution;
1 parent 7c58ca0 commit 53d8c5d

File tree

3 files changed

+245
-10
lines changed

3 files changed

+245
-10
lines changed

.clang-format

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveAssignments:
8+
Enabled: false
9+
AcrossEmptyLines: false
10+
AcrossComments: false
11+
AlignCompound: false
12+
PadOperators: true
13+
AlignConsecutiveBitFields:
14+
Enabled: false
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: false
18+
PadOperators: false
19+
AlignConsecutiveDeclarations:
20+
Enabled: false
21+
AcrossEmptyLines: false
22+
AcrossComments: false
23+
AlignCompound: false
24+
PadOperators: false
25+
AlignConsecutiveMacros:
26+
Enabled: false
27+
AcrossEmptyLines: false
28+
AcrossComments: false
29+
AlignCompound: false
30+
PadOperators: false
31+
AlignEscapedNewlines: Right
32+
AlignOperands: Align
33+
AlignTrailingComments:
34+
Kind: Always
35+
OverEmptyLines: 0
36+
AllowAllArgumentsOnNextLine: true
37+
AllowAllParametersOfDeclarationOnNextLine: true
38+
AllowShortBlocksOnASingleLine: Never
39+
AllowShortCaseLabelsOnASingleLine: false
40+
AllowShortEnumsOnASingleLine: true
41+
AllowShortFunctionsOnASingleLine: All
42+
AllowShortIfStatementsOnASingleLine: Never
43+
AllowShortLambdasOnASingleLine: All
44+
AllowShortLoopsOnASingleLine: false
45+
AlwaysBreakAfterDefinitionReturnType: None
46+
AlwaysBreakAfterReturnType: None
47+
AlwaysBreakBeforeMultilineStrings: false
48+
AlwaysBreakTemplateDeclarations: MultiLine
49+
AttributeMacros:
50+
- __capability
51+
BinPackArguments: true
52+
BinPackParameters: true
53+
BitFieldColonSpacing: Both
54+
BraceWrapping:
55+
AfterCaseLabel: false
56+
AfterClass: false
57+
AfterControlStatement: Never
58+
AfterEnum: false
59+
AfterExternBlock: false
60+
AfterFunction: false
61+
AfterNamespace: false
62+
AfterObjCDeclaration: false
63+
AfterStruct: false
64+
AfterUnion: false
65+
BeforeCatch: false
66+
BeforeElse: false
67+
BeforeLambdaBody: false
68+
BeforeWhile: false
69+
IndentBraces: false
70+
SplitEmptyFunction: true
71+
SplitEmptyRecord: true
72+
SplitEmptyNamespace: true
73+
BreakAfterAttributes: Never
74+
BreakAfterJavaFieldAnnotations: false
75+
BreakArrays: true
76+
BreakBeforeBinaryOperators: None
77+
BreakBeforeConceptDeclarations: Always
78+
BreakBeforeBraces: Attach
79+
BreakBeforeInlineASMColon: OnlyMultiline
80+
BreakBeforeTernaryOperators: true
81+
BreakConstructorInitializers: BeforeColon
82+
BreakInheritanceList: BeforeColon
83+
BreakStringLiterals: true
84+
ColumnLimit: 80
85+
CommentPragmas: '^ IWYU pragma:'
86+
CompactNamespaces: false
87+
ConstructorInitializerIndentWidth: 4
88+
ContinuationIndentWidth: 4
89+
Cpp11BracedListStyle: true
90+
DerivePointerAlignment: false
91+
DisableFormat: false
92+
EmptyLineAfterAccessModifier: Never
93+
EmptyLineBeforeAccessModifier: LogicalBlock
94+
ExperimentalAutoDetectBinPacking: false
95+
FixNamespaceComments: true
96+
ForEachMacros:
97+
- foreach
98+
- Q_FOREACH
99+
- BOOST_FOREACH
100+
IfMacros:
101+
- KJ_IF_MAYBE
102+
IncludeBlocks: Preserve
103+
IncludeCategories:
104+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
105+
Priority: 2
106+
SortPriority: 0
107+
CaseSensitive: false
108+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
109+
Priority: 3
110+
SortPriority: 0
111+
CaseSensitive: false
112+
- Regex: '.*'
113+
Priority: 1
114+
SortPriority: 0
115+
CaseSensitive: false
116+
IncludeIsMainRegex: '(Test)?$'
117+
IncludeIsMainSourceRegex: ''
118+
IndentAccessModifiers: false
119+
IndentCaseBlocks: false
120+
IndentCaseLabels: false
121+
IndentExternBlock: AfterExternBlock
122+
IndentGotoLabels: true
123+
IndentPPDirectives: None
124+
IndentRequiresClause: true
125+
IndentWidth: 4
126+
IndentWrappedFunctionNames: false
127+
InsertBraces: false
128+
InsertNewlineAtEOF: false
129+
InsertTrailingCommas: None
130+
IntegerLiteralSeparator:
131+
Binary: 0
132+
Decimal: 0
133+
Hex: 0
134+
JavaScriptQuotes: Leave
135+
JavaScriptWrapImports: true
136+
KeepEmptyLinesAtTheStartOfBlocks: true
137+
LambdaBodyIndentation: Signature
138+
LineEnding: DeriveLF
139+
MacroBlockBegin: ''
140+
MacroBlockEnd: ''
141+
MaxEmptyLinesToKeep: 1
142+
NamespaceIndentation: None
143+
ObjCBinPackProtocolList: Auto
144+
ObjCBlockIndentWidth: 2
145+
ObjCBreakBeforeNestedBlockParam: true
146+
ObjCSpaceAfterProperty: false
147+
ObjCSpaceBeforeProtocolList: true
148+
PackConstructorInitializers: BinPack
149+
PenaltyBreakAssignment: 2
150+
PenaltyBreakBeforeFirstCallParameter: 19
151+
PenaltyBreakComment: 300
152+
PenaltyBreakFirstLessLess: 120
153+
PenaltyBreakOpenParenthesis: 0
154+
PenaltyBreakString: 1000
155+
PenaltyBreakTemplateDeclaration: 10
156+
PenaltyExcessCharacter: 1000000
157+
PenaltyIndentedWhitespace: 0
158+
PenaltyReturnTypeOnItsOwnLine: 60
159+
PointerAlignment: Right
160+
PPIndentWidth: -1
161+
QualifierAlignment: Leave
162+
ReferenceAlignment: Pointer
163+
ReflowComments: true
164+
RemoveBracesLLVM: false
165+
RemoveSemicolon: false
166+
RequiresClausePosition: OwnLine
167+
RequiresExpressionIndentation: OuterScope
168+
SeparateDefinitionBlocks: Leave
169+
ShortNamespaceLines: 1
170+
SortIncludes: CaseSensitive
171+
SortJavaStaticImport: Before
172+
SortUsingDeclarations: LexicographicNumeric
173+
SpaceAfterCStyleCast: false
174+
SpaceAfterLogicalNot: false
175+
SpaceAfterTemplateKeyword: true
176+
SpaceAroundPointerQualifiers: Default
177+
SpaceBeforeAssignmentOperators: true
178+
SpaceBeforeCaseColon: false
179+
SpaceBeforeCpp11BracedList: false
180+
SpaceBeforeCtorInitializerColon: true
181+
SpaceBeforeInheritanceColon: true
182+
SpaceBeforeParens: ControlStatements
183+
SpaceBeforeParensOptions:
184+
AfterControlStatements: true
185+
AfterForeachMacros: true
186+
AfterFunctionDefinitionName: false
187+
AfterFunctionDeclarationName: false
188+
AfterIfMacros: true
189+
AfterOverloadedOperator: false
190+
AfterRequiresInClause: false
191+
AfterRequiresInExpression: false
192+
BeforeNonEmptyParentheses: false
193+
SpaceBeforeRangeBasedForLoopColon: true
194+
SpaceBeforeSquareBrackets: false
195+
SpaceInEmptyBlock: false
196+
SpaceInEmptyParentheses: false
197+
SpacesBeforeTrailingComments: 1
198+
SpacesInAngles: Never
199+
SpacesInConditionalStatement: false
200+
SpacesInContainerLiterals: true
201+
SpacesInCStyleCastParentheses: false
202+
SpacesInLineCommentPrefix:
203+
Minimum: 1
204+
Maximum: -1
205+
SpacesInParentheses: false
206+
SpacesInSquareBrackets: false
207+
Standard: Latest
208+
StatementAttributeLikeMacros:
209+
- Q_EMIT
210+
StatementMacros:
211+
- Q_UNUSED
212+
- QT_REQUIRE_VERSION
213+
TabWidth: 8
214+
UseTab: Never
215+
WhitespaceSensitiveMacros:
216+
- BOOST_PP_STRINGIZE
217+
- CF_SWIFT_NAME
218+
- NS_SWIFT_NAME
219+
- PP_STRINGIZE
220+
- STRINGIZE
221+
...
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module;
2+
#include <string>
3+
#include <vector>
4+
export module leetcode_test.determine_if_two_events_have_conflict.Solution;
5+
6+
using std::string;
7+
using std::vector;
8+
9+
namespace leetcode_test::determine_if_two_events_have_conflict {
10+
export class Solution {
11+
public:
12+
bool haveConflict(vector<string>& event1, vector<string>& event2)
13+
{
14+
return event1[0] <= event2[1] && event1[1] >= event2[0];
15+
}
16+
};
17+
}

split-a-circular-linked-list/test.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,28 @@ using namespace leetcode_test::split_a_circular_linked_list;
1717
using namespace std;
1818
using std::vector;
1919
template <class T>
20-
concept sizable = requires(T& t)
21-
{
20+
concept sizable = requires(T& t) {
2221
{
2322
t.size()
24-
} -> std::same_as<size_t>;
23+
} -> std::same_as<size_t>;
2524
};
2625
template <class T>
27-
concept iterable = requires(T& t)
28-
{
26+
concept iterable = requires(T& t) {
2927
++t.begin();
3028
{
3129
t.begin() != t.end()
3230

33-
} -> std::same_as<bool>;
31+
} -> std::same_as<bool>;
3432
};
3533

3634
template <class T, typename Y>
37-
concept equalable = requires(T& t, Y& y, size_t i)
38-
{
35+
concept equalable = requires(T& t, Y& y, size_t i) {
3936
{
4037
*t.begin() == *y.begin()
41-
} -> std::same_as<bool>;
38+
} -> std::same_as<bool>;
4239
};
4340
template <typename T, typename Y>
44-
requires sizable<T> and sizable<Y> and equalable<T, Y> and iterable<T> and iterable<Y>
41+
requires sizable<T> and sizable<Y> and equalable<T, Y> and iterable<T> and iterable<Y>
4542
auto assertContentEquals(T& left, Y& right)
4643
{
4744

0 commit comments

Comments
 (0)