Skip to content

Commit 928346a

Browse files
committed
문제 추가
1 parent 24e18cb commit 928346a

File tree

28 files changed

+1508
-0
lines changed

28 files changed

+1508
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 50;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
3E79C8CB2410C15F00E64780 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E79C8CA2410C15F00E64780 /* main.cpp */; };
11+
/* End PBXBuildFile section */
12+
13+
/* Begin PBXCopyFilesBuildPhase section */
14+
3E79C8C52410C15F00E64780 /* CopyFiles */ = {
15+
isa = PBXCopyFilesBuildPhase;
16+
buildActionMask = 2147483647;
17+
dstPath = /usr/share/man/man1/;
18+
dstSubfolderSpec = 0;
19+
files = (
20+
);
21+
runOnlyForDeploymentPostprocessing = 1;
22+
};
23+
/* End PBXCopyFilesBuildPhase section */
24+
25+
/* Begin PBXFileReference section */
26+
3E79C8C72410C15F00E64780 /* 10451 순열사이클 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "10451 순열사이클"; sourceTree = BUILT_PRODUCTS_DIR; };
27+
3E79C8CA2410C15F00E64780 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
28+
/* End PBXFileReference section */
29+
30+
/* Begin PBXFrameworksBuildPhase section */
31+
3E79C8C42410C15F00E64780 /* Frameworks */ = {
32+
isa = PBXFrameworksBuildPhase;
33+
buildActionMask = 2147483647;
34+
files = (
35+
);
36+
runOnlyForDeploymentPostprocessing = 0;
37+
};
38+
/* End PBXFrameworksBuildPhase section */
39+
40+
/* Begin PBXGroup section */
41+
3E79C8BE2410C15F00E64780 = {
42+
isa = PBXGroup;
43+
children = (
44+
3E79C8C92410C15F00E64780 /* 10451 순열사이클 */,
45+
3E79C8C82410C15F00E64780 /* Products */,
46+
);
47+
sourceTree = "<group>";
48+
};
49+
3E79C8C82410C15F00E64780 /* Products */ = {
50+
isa = PBXGroup;
51+
children = (
52+
3E79C8C72410C15F00E64780 /* 10451 순열사이클 */,
53+
);
54+
name = Products;
55+
sourceTree = "<group>";
56+
};
57+
3E79C8C92410C15F00E64780 /* 10451 순열사이클 */ = {
58+
isa = PBXGroup;
59+
children = (
60+
3E79C8CA2410C15F00E64780 /* main.cpp */,
61+
);
62+
path = "10451 순열사이클";
63+
sourceTree = "<group>";
64+
};
65+
/* End PBXGroup section */
66+
67+
/* Begin PBXNativeTarget section */
68+
3E79C8C62410C15F00E64780 /* 10451 순열사이클 */ = {
69+
isa = PBXNativeTarget;
70+
buildConfigurationList = 3E79C8CE2410C15F00E64780 /* Build configuration list for PBXNativeTarget "10451 순열사이클" */;
71+
buildPhases = (
72+
3E79C8C32410C15F00E64780 /* Sources */,
73+
3E79C8C42410C15F00E64780 /* Frameworks */,
74+
3E79C8C52410C15F00E64780 /* CopyFiles */,
75+
);
76+
buildRules = (
77+
);
78+
dependencies = (
79+
);
80+
name = "10451 순열사이클";
81+
productName = "10451 순열사이클";
82+
productReference = 3E79C8C72410C15F00E64780 /* 10451 순열사이클 */;
83+
productType = "com.apple.product-type.tool";
84+
};
85+
/* End PBXNativeTarget section */
86+
87+
/* Begin PBXProject section */
88+
3E79C8BF2410C15F00E64780 /* Project object */ = {
89+
isa = PBXProject;
90+
attributes = {
91+
LastUpgradeCheck = 1100;
92+
TargetAttributes = {
93+
3E79C8C62410C15F00E64780 = {
94+
CreatedOnToolsVersion = 11.0;
95+
};
96+
};
97+
};
98+
buildConfigurationList = 3E79C8C22410C15F00E64780 /* Build configuration list for PBXProject "10451 순열사이클" */;
99+
compatibilityVersion = "Xcode 9.3";
100+
developmentRegion = en;
101+
hasScannedForEncodings = 0;
102+
knownRegions = (
103+
en,
104+
Base,
105+
);
106+
mainGroup = 3E79C8BE2410C15F00E64780;
107+
productRefGroup = 3E79C8C82410C15F00E64780 /* Products */;
108+
projectDirPath = "";
109+
projectRoot = "";
110+
targets = (
111+
3E79C8C62410C15F00E64780 /* 10451 순열사이클 */,
112+
);
113+
};
114+
/* End PBXProject section */
115+
116+
/* Begin PBXSourcesBuildPhase section */
117+
3E79C8C32410C15F00E64780 /* Sources */ = {
118+
isa = PBXSourcesBuildPhase;
119+
buildActionMask = 2147483647;
120+
files = (
121+
3E79C8CB2410C15F00E64780 /* main.cpp in Sources */,
122+
);
123+
runOnlyForDeploymentPostprocessing = 0;
124+
};
125+
/* End PBXSourcesBuildPhase section */
126+
127+
/* Begin XCBuildConfiguration section */
128+
3E79C8CC2410C15F00E64780 /* Debug */ = {
129+
isa = XCBuildConfiguration;
130+
buildSettings = {
131+
ALWAYS_SEARCH_USER_PATHS = NO;
132+
CLANG_ANALYZER_NONNULL = YES;
133+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
134+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
135+
CLANG_CXX_LIBRARY = "libc++";
136+
CLANG_ENABLE_MODULES = YES;
137+
CLANG_ENABLE_OBJC_ARC = YES;
138+
CLANG_ENABLE_OBJC_WEAK = YES;
139+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140+
CLANG_WARN_BOOL_CONVERSION = YES;
141+
CLANG_WARN_COMMA = YES;
142+
CLANG_WARN_CONSTANT_CONVERSION = YES;
143+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
144+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
145+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
146+
CLANG_WARN_EMPTY_BODY = YES;
147+
CLANG_WARN_ENUM_CONVERSION = YES;
148+
CLANG_WARN_INFINITE_RECURSION = YES;
149+
CLANG_WARN_INT_CONVERSION = YES;
150+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
151+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
152+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
153+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
154+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
155+
CLANG_WARN_STRICT_PROTOTYPES = YES;
156+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
157+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
158+
CLANG_WARN_UNREACHABLE_CODE = YES;
159+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
160+
COPY_PHASE_STRIP = NO;
161+
DEBUG_INFORMATION_FORMAT = dwarf;
162+
ENABLE_STRICT_OBJC_MSGSEND = YES;
163+
ENABLE_TESTABILITY = YES;
164+
GCC_C_LANGUAGE_STANDARD = gnu11;
165+
GCC_DYNAMIC_NO_PIC = NO;
166+
GCC_NO_COMMON_BLOCKS = YES;
167+
GCC_OPTIMIZATION_LEVEL = 0;
168+
GCC_PREPROCESSOR_DEFINITIONS = (
169+
"DEBUG=1",
170+
"$(inherited)",
171+
);
172+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
173+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
174+
GCC_WARN_UNDECLARED_SELECTOR = YES;
175+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
176+
GCC_WARN_UNUSED_FUNCTION = YES;
177+
GCC_WARN_UNUSED_VARIABLE = YES;
178+
MACOSX_DEPLOYMENT_TARGET = 10.14;
179+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
180+
MTL_FAST_MATH = YES;
181+
ONLY_ACTIVE_ARCH = YES;
182+
SDKROOT = macosx;
183+
};
184+
name = Debug;
185+
};
186+
3E79C8CD2410C15F00E64780 /* Release */ = {
187+
isa = XCBuildConfiguration;
188+
buildSettings = {
189+
ALWAYS_SEARCH_USER_PATHS = NO;
190+
CLANG_ANALYZER_NONNULL = YES;
191+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
192+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
193+
CLANG_CXX_LIBRARY = "libc++";
194+
CLANG_ENABLE_MODULES = YES;
195+
CLANG_ENABLE_OBJC_ARC = YES;
196+
CLANG_ENABLE_OBJC_WEAK = YES;
197+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
198+
CLANG_WARN_BOOL_CONVERSION = YES;
199+
CLANG_WARN_COMMA = YES;
200+
CLANG_WARN_CONSTANT_CONVERSION = YES;
201+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
202+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
203+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
204+
CLANG_WARN_EMPTY_BODY = YES;
205+
CLANG_WARN_ENUM_CONVERSION = YES;
206+
CLANG_WARN_INFINITE_RECURSION = YES;
207+
CLANG_WARN_INT_CONVERSION = YES;
208+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
209+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
210+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
211+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
212+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
213+
CLANG_WARN_STRICT_PROTOTYPES = YES;
214+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
215+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
216+
CLANG_WARN_UNREACHABLE_CODE = YES;
217+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
218+
COPY_PHASE_STRIP = NO;
219+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
220+
ENABLE_NS_ASSERTIONS = NO;
221+
ENABLE_STRICT_OBJC_MSGSEND = YES;
222+
GCC_C_LANGUAGE_STANDARD = gnu11;
223+
GCC_NO_COMMON_BLOCKS = YES;
224+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
225+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
226+
GCC_WARN_UNDECLARED_SELECTOR = YES;
227+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
228+
GCC_WARN_UNUSED_FUNCTION = YES;
229+
GCC_WARN_UNUSED_VARIABLE = YES;
230+
MACOSX_DEPLOYMENT_TARGET = 10.14;
231+
MTL_ENABLE_DEBUG_INFO = NO;
232+
MTL_FAST_MATH = YES;
233+
SDKROOT = macosx;
234+
};
235+
name = Release;
236+
};
237+
3E79C8CF2410C15F00E64780 /* Debug */ = {
238+
isa = XCBuildConfiguration;
239+
buildSettings = {
240+
CODE_SIGN_STYLE = Automatic;
241+
PRODUCT_NAME = "$(TARGET_NAME)";
242+
};
243+
name = Debug;
244+
};
245+
3E79C8D02410C15F00E64780 /* Release */ = {
246+
isa = XCBuildConfiguration;
247+
buildSettings = {
248+
CODE_SIGN_STYLE = Automatic;
249+
PRODUCT_NAME = "$(TARGET_NAME)";
250+
};
251+
name = Release;
252+
};
253+
/* End XCBuildConfiguration section */
254+
255+
/* Begin XCConfigurationList section */
256+
3E79C8C22410C15F00E64780 /* Build configuration list for PBXProject "10451 순열사이클" */ = {
257+
isa = XCConfigurationList;
258+
buildConfigurations = (
259+
3E79C8CC2410C15F00E64780 /* Debug */,
260+
3E79C8CD2410C15F00E64780 /* Release */,
261+
);
262+
defaultConfigurationIsVisible = 0;
263+
defaultConfigurationName = Release;
264+
};
265+
3E79C8CE2410C15F00E64780 /* Build configuration list for PBXNativeTarget "10451 순열사이클" */ = {
266+
isa = XCConfigurationList;
267+
buildConfigurations = (
268+
3E79C8CF2410C15F00E64780 /* Debug */,
269+
3E79C8D02410C15F00E64780 /* Release */,
270+
);
271+
defaultConfigurationIsVisible = 0;
272+
defaultConfigurationName = Release;
273+
};
274+
/* End XCConfigurationList section */
275+
};
276+
rootObject = 3E79C8BF2410C15F00E64780 /* Project object */;
277+
}

10451 순열사이클/10451 순열사이클.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>10451 순열사이클.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#include<iostream>
2+
#include<queue>
3+
using namespace std;
4+
int main(){
5+
int t,i;
6+
cin>>t;
7+
for(i=0;i<t;i++){
8+
int n,j,count=0;
9+
cin>>n;
10+
int arr[n+1],visit[n+1];
11+
12+
for(j=1;j<=n;j++){
13+
cin>>arr[j];
14+
visit[j]=0;
15+
}
16+
for(j=1;j<n;j++){
17+
if(visit[arr[j]]==0){
18+
queue<int> q;
19+
q.push(arr[j]);
20+
visit[arr[j]]=1;
21+
while(1){
22+
int num=arr[q.front()];
23+
if(visit[num]==1)
24+
break;
25+
else{
26+
visit[num]=1;
27+
q.push(num);
28+
}
29+
q.pop();
30+
}
31+
count+=1;
32+
}
33+
}
34+
cout<<count<<endl;
35+
}
36+
}
Binary file not shown.

0 commit comments

Comments
 (0)