developer coding user risk: low
C++ Efficient Solver with Compact Styling
Instructs solving a programming question in C++ using namespace std in a simple, highly efficient way. Requires code styling with no comments, no spaces between operators and opera…
PROMPT
SOLVE THE QUESTION IN CPP, USING NAMESPACE STD, IN A SIMPLE BUT HIGHLY EFFICIENT WAY, AND PROVIDE IT WITH THIS RESTYLING: no comments, no space between operator and operand but proper margin and indentation, brackets open on the next line always and do not forget to rename variables as short as possible, possibly alphabets
REQUIRED CONTEXT
- programming question
ROLES & RULES
- Solve the question in C++.
- Use namespace std.
- Make it simple but highly efficient.
- Provide no comments.
- No space between operator and operand.
- Use proper margin and indentation.
- Open brackets on the next line always.
- Rename variables as short as possible, possibly alphabets
EXPECTED OUTPUT
- Format
- code
- Constraints
-
- no comments
- no space between operator and operand but proper margin and indentation
- brackets open on the next line always
- rename variables as short as possible possibly alphabets
- using namespace std
SUCCESS CRITERIA
- Solve in C++ using namespace std
- Ensure simple and highly efficient
- Apply specified restyling exactly
FAILURE MODES
- Adding comments
- Using spaces between operator and operand
- Long variable names
- Incorrect bracket placement
- Poor indentation
- Inefficient code
- Not using namespace std
CAVEATS
- Dependencies
-
- Requires the specific question to solve
- Missing context
-
- The specific programming problem or question to solve.
- Expected input/output specifications.
- C++ standard version (e.g., C++11, C++17).
- Whether a full program with main() or a function/snippet is required.
- Ambiguities
-
- 'THE QUESTION' is not specified or provided.
- 'proper margin and indentation' is vague and undefined.
- 'highly efficient' lacks quantifiable criteria.
QUALITY
- OVERALL
- 0.40
- CLARITY
- 0.60
- SPECIFICITY
- 0.70
- REUSABILITY
- 0.30
- COMPLETENESS
- 0.20
IMPROVEMENT SUGGESTIONS
- Introduce a clear placeholder for the problem, e.g., 'SOLVE THE FOLLOWING QUESTION IN C++: {question}'.
- Rewrite in sentence case with proper punctuation and structure for readability.
- Define 'proper margin and indentation', e.g., 'Use 4 spaces for indentation and one space between statements.'.
- Specify if output should include #include directives and int main().
- Add examples of desired variable renaming and bracket style.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- Context7 Library Documentation Expert developer coding
- Structured Python Production Code Generator developer coding
- Angular Standalone Directive Generator developer coding
- Pytest Unit Test Suite Generator developer coding
- Unity Architecture Specialist developer coding
- Web Typography CSS Generator developer coding
- VSCode CodeTour File Expert developer coding
- Senior Python Code Reviewer developer coding
- Structured Cross-Language Code Translator developer coding
- Multi-DB SQL Query Optimizer and Builder developer coding
- Base R Programming Reference Guide developer coding
- Flutter Map SDK Layer Bug Fixer developer coding
- Expert Mobile App Builder for iOS Android developer coding
- Scalable Backend Architect Expert developer coding
- Comprehensive TypeScript Codebase Reviewer developer coding
- Code Improvement and Refactoring Suggester developer coding
- Vercel SPA Blank Screen Diagnoser developer coding
- CLAUDE.md File Generator for AI Coders developer coding
- App Store Screenshots Gallery Generator developer coding
- Spring Boot SOLID Architect Specialist developer coding
- React SaaS Metrics Dashboard Generator developer coding
- Software Optimization Auditor developer coding
- Senior Frontend Task Checklist Architect developer coding
- POSIX Shell Script Developer with Checklists developer coding
- Astro v6 Strict Architecture Rules developer coding