rename aplus october 2013

This commit is contained in:
Xevion
2020-02-22 05:47:56 -06:00
parent 6f5d851b0a
commit 22ed622f05
103 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/7.iml" filepath="$PROJECT_DIR$/7.iml" />
</modules>
</component>
</project>

6
uil/aplus-octoboer-2013/7/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="bb180874-2412-4c96-b84b-4eb63b971832" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="-536804464">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.open.time.1" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="dat" value="2" />
<entry key="java" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="1" />
<entry key="PLAIN_TEXT" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="dat" value="532" />
<entry key="java" value="3129" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JAVA" value="3129" />
<entry key="PLAIN_TEXT" value="532" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/problem7.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="16" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/input.dat">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="29" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>tortillas</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="GradleLocalSettings">
<option name="projectSyncType">
<map>
<entry key="A:/Programming/Modding/Minecraft/EnderStorage" value="PREVIEW" />
<entry key="A:/Programming/Modding/Minecraft/Fabric/fabric-example-mod" value="PREVIEW" />
<entry key="A:/Programming/Modding/Minecraft/HelloWorldMod" value="PREVIEW" />
</map>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/input.dat" />
<option value="$PROJECT_DIR$/src/problem7.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1936" />
<option name="height" value="1066" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="7" type="b2602c69:ProjectViewProjectNode" />
<item name="7" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1568703587957" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="problem7" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="problem7" />
<module name="7" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.problem7" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="bb180874-2412-4c96-b84b-4eb63b971832" name="Default Changelist" comment="" />
<created>1568701177324</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1568701177324</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
<layout>
<window_info id="Image Layers" />
<window_info id="Designer" />
<window_info id="UI Designer" />
<window_info id="Capture Tool" />
<window_info id="Favorites" side_tool="true" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Messages" weight="0.32939914" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32939914" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39914164" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Palette" />
<window_info anchor="right" id="Theme Preview" />
<window_info anchor="right" id="Capture Analysis" />
<window_info anchor="right" id="Palette&#9;" />
<window_info anchor="right" id="Maven Projects" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/input.dat">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="29" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/problem7.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="16" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>11</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,16 @@
3
1
eggs ham bread
ham eggs bread
2
eggs ham bread lettuce poptarts flour sugar tea hamburger
tortillas beans corn tomatoes
toy eggs ham bread lettuce poptarts flour sugar tea
hamburger candybars corn tomatoes beans tortillas icecream
3
lettuce carrots tomatoes celery cabbage beans tortillas
pork beef chicken ribs bread crackers chips cookies milk
oj caprisun drpepper
lettuce tomatoes celery cabbage beans tortillas
pork beef chicken bread crackers cookies milk
caprisun drpepper

View File

Binary file not shown.

View File

@@ -0,0 +1,54 @@
import static java.lang.System.*;
import java.util.Arrays;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.List;
import java.util.Scanner;
public class problem7 {
public static void main(String[] args) throws FileNotFoundException {
// Constants
File input = new File("input.dat");
Scanner read = new Scanner(input);
int lines = read.nextInt();
read.nextLine();
// Process all lines
for(int i = 0; i < lines; i++) {
// Process all lines into primitive String arrays
int listLines = read.nextInt();
String rawGroceryList = "";
String rawReceiptList = "";
read.nextLine();
// Process all lines into words
for(int x = 0; x < listLines; x++)
rawGroceryList += read.nextLine() + "\n";
for(int x = 0; x < listLines; x++)
rawReceiptList += read.nextLine() + "\n";
// Split by any whitespace sequence into ArrayLists
List<String> groceryList = Arrays.asList(rawGroceryList.split("\\s+"));
List<String> receiptList = Arrays.asList(rawReceiptList.split("\\s+"));
// Find which to put back
String putBack = "PUT BACK";
for(String item : receiptList) {
if(groceryList.indexOf(item) == -1)
putBack += " " + item;
}
// Find which to buy more of
String buyMore = "BUY MORE";
for(String item : groceryList) {
if(receiptList.indexOf(item) == -1)
buyMore += " " + item;
}
// Process and return final putback/buymore consensus
if(putBack.equals("PUT BACK") && buyMore.equals("BUY MORE"))
out.println("OK");
else if (!putBack.equals("PUT BACK") && buyMore.equals("BUY MORE"))
out.println(putBack);
else if (putBack.equals("PUT BACK") && !buyMore.equals("BUY MORE"))
out.println(buyMore);
else
out.println(putBack + "\n" + buyMore);
}
}
}